Backup of merce on a location
Submitted by saurabh on Sat, 2006-06-03 11:57
HOW TO TAKE BACKUP FROM MERCE VIA XBACKUP?
Suppose we want to take the backup of NFL Noida to its gatekeeper whose ip is 10.20.30.40 in
the directory /var/warehouse/noidabackup. Before deciding where to take backup please check
the whether enough size is available or not in the destination directory by executing
"df -h".
The following steps are required to be followed :
HOW TO TAKE BACKUP FROM MERCE VIA XBACKUP?
Suppose we want to take the backup of NFL Noida to its gatekeeper whose ip is 10.20.30.40 in
the directory /var/warehouse/noidabackup. Before deciding where to take backup please check
the whether enough size is available or not in the destination directory by executing
"df -h".
The following steps are required to be followed :
- Xbackup uses rsync to bakcup the data and its configuration file is /etc/merce/xbackup.conf
- In case of Merce we take the backup of the database and the following directory content
- /etc/
- /opt/merce/
- /var/lib/merce
- /var/lib/named
- /var/spool/imap
- /var/lib/imap
- /var/spool/uucp
- Create the structure of the above directories with respect to the backup directory on destination i.e. execute
- mkdir -p /var/warehouse/noidabackup/etc/
- mkdir -p /var/warehouse/noidabackup/opt/merce
- mkdir -p /var/warehouse/noidabackup/var/lib/merce
- mkdir -p /var/warehouse/noidabackup/var/lib/named
- mkdir -p /var/warehouse/noidabackup/var/spool/imap
- mkdir -p /var/warehouse/noidabackup/var/lib/imap
- mkdir -p /var/warehouse/noidabackup/var/spool/uucp
- Backup of database
- look up to the root password for mysql dbase in /etc/merce/passwords.txt
- execute as root: mysqldump -u root -p merce > /var/tmp/merce_dbase_20060602.sql
- enter password when prompted
- Configure xbackup on the source from which backup is to be taken.
- For taking backup of the above directories recursively set the variable TASKPATH
- there is an option GLOBAL_RSYNC_OPTS="-W". This says that when taking backup
take backup of the "whole" directory irrespective of whether that backup is already
present on destination machine - Shutdown uucp service if any
- netstat -anp | grep :540
- if it shows the xinetd as result cd /etc/xinetd.d/
- vi uucp
- change the variable "disable=no" to "disable=yes"
- restart xinted /etc/init.d/xinted.d restart
- crontab -e -u uucp
- comment the uucico entry
- run xbackup as : nohup /opt/merce/sbin/xbackup > /var/tmp/xbackup.out
2>/var/tmp/xbackup.err& - continously monitor /var/tmp/xbackup.out and /var/tmp/xbackup.err
- if there is an entry in xbackup.err saying that rsync has stopped please check
the status of the same via ps -ef | grep rsync. - ps -ef | grep xbackup
- kill xbackup and restart. Please note that if at all due to any reason you kill
xbackup remember that xbackup spawns out a process of rsync so that even if the
parent (xbackup) might be killed the child (rsync) would still be running. Hence
kill rsync first and then xbackup. - If xbackup stops half way through and you want to restart xbackup after
comparison on the source and destination side you can delete the taskpaths for whom
the backup has already been taken and restart xbackup - After completion of backup check the status on the source and destination
machine by executing "du -sh" - Sometimes the backup size of the destination machine would be higher than that
of the source. This might be because when you have taken backup of the mails some
users having pop accounts download mails on their machines. - In some cases after you have taken the backup of a machine you might be
required to take the backup again after 1-2 days. This time you want to copy just
the data which has been appended to those directories and not everything. For this
incremental data backup change the option GLOBAL_RSYNC_OPTS="-W" to
GLOBAL_RSYNC_OPTS="".
TASKPATHS="
/etc/%root@10.20.30.40:/var/warehouse/noidabackup/etc/%
/opt/merce/%root@10.20.30.40:/var/warehouse/noidabackup/opt/merce/%
/var/lib/merce/%root@10.20.30.40:/var/warehouse/noidabackup/var/lib/merce/%
/var/lib/named/%root@10.20.30.40:/var/warehouse/noidabackup/var/lib/named/%
/var/spool/imap/%root@10.20.30.40:/var/warehouse/noidabackup/var/spool/imap/%
/var/lib/imap/%root@10.20.30.40:/var/warehouse/noidabackup/var/lib/imap/%
/var/spool/uucp/%root@10.20.30.40:/var/warehouse/noidabackup/var/spool/uucp/%
"
»
- Login to post comments
- Printer-friendly version
- Send to friend