SETTING UP DESKTOP BACKUP When setting up a disk-to-disk backup of desktop partitions one must keep in mind to: (1) try to backup to a different box if available (1a) or at least to a different physical media (disk or raid) (2) make sure the backup volume is as big or bigger than source (3) spread out cron time to not interfer with other backup traffic For backup, we will use the nmrroot account which should now exist on each client. First, create a backup script called /usr/etc/rsyncbackup that uses rsync. Here is an example: ========== #!/bin/sh ps=`ps auxw | grep 'rsync:' | grep exclude` if [ -n "$ps" ] ; then echo "FAIL: old rsync still running" | \ mail -s '[hostname] FAILURE' systems@nmr.mgh.harvard.edu exit 2 fi cd /local_mount/space/perun/3 || exit 2 if ! test -f ID-perun-3 ; then echo NO ID-perun-3 ; exit 2 ; fi touch ID-perun-3 rsync -S -a --delete --numeric-ids --exclude=/lost+found . \ maple:/local_mount/space/maple/3/BACKUP/perun/3 cd /local_mount/space/perun/4 || exit 2 if ! test -f ID-perun-4 ; then echo NO ID-perun-4 ; exit 2 ; fi touch ID-perun-4 rsync -S -a --delete --numeric-ids --exclude=/lost+found . \ maple:/local_mount/space/maple/4/BACKUP/perun/4 ===== make sure all the distination BACKUP directories exist make this file executable. if the source machine is running fedora, make sure to add -e "rsh" to the rsync options. the first chunk of code checks to see if old rsyncs are still running. The 'cd' and test for ID-perun-3 are simple tests that the source volume is okay to prevent backing up a blank volume. Make sure those ID-* files exist as they often get forgotten. Determine the best time to do the backup and then create a /etc/cron.d/rsyncbackup file such as: ========== 22 4 * * 6 nmrroot /usr/etc/rsyncbackup ========== which will do the backup every Saturday morning at 4:22am. Do a 'service crond reload' so the cron server sees it. Make sure the nmrroot user is defined in /etc/passwd. If not run /space/amaebi/1/admin/nmrroot.install Make sure rsh is enabled on target system and that /nmrroot/.rhosts and /root/.rhosts has entries for the source box for both nmrroot and root To enable rsh, edit /etc/xinetd.d/rsh, reload xinetd and add "rsh" to the bottom of /etc/securetty Edit /space/sake/5/admin/notes/DesktopBackup.DB to add an entry for the backups.