rsyncing a bootable backup

Partition the two external drives the same way as your system drive, and rsync all your partitions as well as dding the boot sector (the first sector of the drive) from the system drive to the external drives. Ugly, but serviceable, if you get your partitioning right (big if).

Also take a look at more advanced "system snapshot" systems like mondo rescue, which kinda take care of that sort of trickery for you.


For Ubuntu I recommend using sbackup, the whole "rsyncing a live bootable disk" just doesn't function very well in Linux. If the UUID's are different on the two drives (9/10 they will be) then you can't simply boot off the backup disk to get back up and running, you'll need to boot off your Ubuntu CD and edit /etc/fstab on the replacement drive first. If the UUIDs are the same, then you're going to run into problems while trying to have the two mounted simultaneously.

There are differences in the Mac filesystem that make this kind of trickery possible, I've never heard of doing this method via rsync but it's very common in the OSX world to backup by simply creating a disk image of your live boot volume, which you can later restore. Functionality to restore such images is provided on the OSX install CD.

The quickest solution for Ubuntu is sbackup and then just reinstalling Ubuntu (from the Ubuntu 'live CD' it's effectively the same as restoring a disk image, after which you restore your previous package selection, config and data from the sbackup archive. Fairly simple and I suspect you could write a howto that takes a new user through the complete steps of backup/install/restore without much problem.


If you are clever, and you plan in advance, you can use LVM to accomplish this for you.

Say you have your system on a drive that uses LVM; in fact, the entire system is on an LVM volume somewhere.

With your second hard drive in an external case, attach the drive to your system, get LVM to recognize the drive, and then use LVM's mirror facility to copy the drive in place. Once a complete copy is finished, break the mirror. You will now have an exact snapshot in time (because the mirror also records any changes that take place during the copy process). The only thing you need now is to make it bootable. If you're using GRUB, you can do this from your existing system.

If you want to be really clever, write up this process as a script, and run the script on a regular basis. All you have to do is make sure the external drive is attached when it runs.