Mirror second drive with rsync

Jim Canfield jcanfield at tshmail.com
Tue Mar 20 17:46:33 UTC 2007


Greetings,

I currently have a situation where I have decided against raid mirroring 
for several reasons, primarily because I always want a snapshot of a 
previous day on a second drive. I am looking for some best practice 
advice on how this should be done.  I'd like to hear some better ideas 
if you all have any:

System:  Centos 4.4 (Maybe 5)
Disks: /dev/sba,/dev/sdb (Identical 36GB SCSI)
Goals:  After initial image, the machine should stay online during 
nightly sync.  If the primary drive fails, restore should  be a matter 
of removing the primary drive and replacing it with the backup drive.


1) Image complete system to rescue drive using bootable cd (dd 
if=/dev/sba of=/dev/sdb)

2) Create rsync script that does the following:

mount rescue (mount /dev/sdb /rescue)
rsync primary drive to rescue drive (rsync -ax --delete --force 
--exclude /rescue / /rescue/)
unmount mirror (umount /rescue)

3) Add script to cron daily.

Almost seems too simple, that scares me! ;) I can't help but wonder if 
'drbd' could do this this more efficiently





More information about the redhat-list mailing list