[wellylug] rsync acting differently

Carl Turney c.turney at orcon.net.nz
Wed Feb 4 11:55:34 NZDT 2009


Hello All,

With the script below, I use rsync to mirror the /boot partition and the 
/ (without /boot) partition on to removable ATA/IDE hard drives.

This script works perfectly on my Fedora Core 5 system...  After backing 
up and umount-ing, the /mnt/newboot and /mnt/newroot are empty and the 
mirrored disk is an exact bootable clone.

But corresponding commands in my Ubuntu Hardy (different hard disks, 
same platform otherwise) seem to send the copies to the /mnt/newroot 
DIRECTORY of the ORIGINAL source root partition (and probably NOT on to 
the mounted partition - I haven't checked if it is there).  After 
umount-ing and even power cycling, they're in the wrong place.

I've just done a complete system update on my Hardy.

This problem does NOT seem to happen to the /mnt/newboot (e.g. 
/dev/sdb1) stage.

I =am= taking into account differences like Ubuntu recognising it as 
/dev/sdb3 vs Fedora's /dev/hde3.

Any ideas?

Thanks very much,

Carl

> #!/bin/bash
> echo Mounting and backing up the boot area
> echo x
> mount /dev/hde1 /mnt/newboot
> rsync -aHvx --delete /boot/ /mnt/newboot
> umount /dev/hde1
> echo Mounting and backing up the root area
> echo x
> mount /dev/hde3 /mnt/newroot
> cd
> rsync -aHvx --delete // /mnt/newroot
> umount /dev/hde3



More information about the wellylug mailing list