I need help rsyncing Local Disks

Marshall28 marshall28 at juno.com
Mon Jun 14 16:39:04 GMT 2004


Recently I've found out about rsync and wanted to use this to mirror local
disks on one of my servers. I first ran Ghost for Linux to get the exact
clone I was looking for, and now I'm ready to setup rsync to keep my drives
mirrored on a continual basis. Here's my setup:

1 Seagate 4.6GB SCSI on /dev/sda, mounted like this:
	/dev/sda1 ==> /boot - 101M
	/dev/sda2 ==> swap - 269M
	/dev/sda3 ==> / - 3.9GB

1 Seagate 16GB SCSI on /dev/sdb has the same look due to the ghost for linux
clone but I need help on how I should keep this drive sync'd with the main
SCSI disk, sda. I saw the script on rsync.samba.org for backing up to a
spare disk but need some help understanding the coding, as well as knowing
if this script will provide me with another spare disk that is a replica of
the primary. From what I can make of this script it doesn't mirror the
drive, it only mirrors these: rootfs, usr, data, and data2.

If this script does replicate disks then he first part of it is really what
I'd be looking to do. In my case I would need to mount /dev/sdb1 as "/boot"
and /dev/sdb3 as "/" somewhere. Whatever tips/insight you guys can provide
on this would be much appreciated. Here's the script:

#!/bin/sh

    export PATH=/usr/local/bin:/usr/bin:/bin

    LIST="rootfs usr data data2"

    for d in $LIST; do
	mount /backup/$d
	rsync -ax --exclude fstab --delete /$d/ /backup/$d/
	umount /backup/$d
    done



thanks
marshall



More information about the rsync mailing list