Saturday, 24 January 2009

How to configure remote backups through NFS.

First, you have to make the appropriate directories available to nfs by "exporting" them. On the remote server, edit the /etc/exports file to expose the directories you need to the hosts that need to access them. See the man page for exports to find out all your options, but here's a simple example from my setup

# /etc/exports

/backup 192.168.1.0(rw,no_root_squash,async)

/backup2 192.168.1.1(rw,no_root_squash,async)


The /etc/exports file must contain a directory, (in this example the directory being exported is /home), as well as the networks (or hosts) the file system is exported to.

In this case it's exported a range of hosts in the network 192.168.1.0. Alternately, it could be exported to a single host using the configuration:

Then go to virtozzo and mount the destination as given below:
[root@sertechs]# mount -t nfs 192.168.1.0:/backup2 /vz/backups

To check if it is mounted or not you can use showmount -e or mount command

Then write /etc/fstab as given below:

198.168.0.1:/backup2 /vz/backup nfs rsize=1024,wsize=1024,noauto 0 0



Then restart nfs and portmap on Virtuzzo server


[root@sertechs]# /etc/init.d/portmap restart

[root@sertechs]# /etc/init.d/nfs restart

Then go to backup server and check if its mounted on this server as well, you can use to check it showmount -e or mount command

If everything is ok, fire the command to effect the changes of /etc/exports:
[root@backup01 backup2]# exportfs -r


and restart both services on this server as well:


[root@sertechs]# /etc/init.d/portmap restart

[root@sertechs]# /etc/init.d/nfs restart


Feel free to contact incase you need any further information or help @

admin@servertechs.co.cc



No comments:

Post a Comment