Here's what I've done (this assumes a single disk, at /dev/sda)

  • use dd to backup the MBR and partition table: "dd bs=512 count=1 if=/dev/sda of=/backups/sda.layout"

  • use rsync to copy the entire thing with something like: "rsync -axvPH --numeric-ids ..."

On restore I do this:

  • boot the target machine with sysrescuecd, I will typically have the 'sda.layout' file on a USB stick.

  • restore the MBR/partition table with dd: "dd bs=512 count=1 if=/path/to/sda.layout of=/dev/sda"

  • Use partprobe (thanks commenter Mark) to get the kernel to re-read the partition table.

  • Mount all the various partions under /restore/. I make the mount points identical under restore, so if I have /boot, /var on my source, I end up with /restore/boot, /restore/var, etc.

  • use rsync to restore the entire thing.


I never clone systems entirely. You never know what may change, and your system cloned image is already out of the date the moment one change occurs. The best way to do it is to establish a procedure that lets you produce functionally identical systems. One possibility is something like Kickstart, or AutoYaST or similar tools. Keep good backups of your configuration, and ideally use a configuration management system such as Bcfg2, Puppet, or CFEngine to configure everything instead of doing it by hand. Then when you need to create a new system that's similar to another one you have, or recreate an existing system, it's a simple and well-defined procedure.


It would take more effort up front, but Kickstart and Revisor allow you customize an installation and use it on other machines. You can include customized versions of your settings files.

You may also want to consider keeping your home directory on a separate partition. You can leave that partition alone while doing a clean install on another partition.


Grab a copy of system recovery cd, and after your initial minimal install, boot from it, mount and chroot into your disk, and then do the rsync. After it's finished you may need to run update-grub to get it booting from the correct boot device and kernel.