Monday, 3 August 2009

Task - Configure backup for virtuzzo on backup server.

Here I am specifying the steps which I used to configure remote backups through NFS.

Task - Configure backup for virtuzzo on backup server.

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:

Code:

# /etc/exports

/backup         174.34.163.101(rw,no_root_squash,async)

/backup2        174.34.162.77(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 174.34.163.101. Alternately, it could be exported to a single host using the configuration:

Then go to virtozzo and mount the destination as given below:

[root@server1]# mount -t nfs  174.34.162.77:/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@server1]# /etc/init.d/portmap restart
[root@server1]# /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@server1]# /etc/init.d/portmap restart
[root@server1]# /etc/init.d/nfs restart

That's it, I got it worked. If you have any problem please email me at mayur.c24@gmail.com

No comments:

Post a Comment