Backing up a disk with SysRescCD

The documentation for the very good SysRescCD has changed, so I can’t find the standard “here’s how to back up a disk” using sfdisk and partimage anymore.

Luckily, it got saved here:

For future reference, this is a good way to back up a disk.

  1. Boot the machine with the disk using SysRescCD.
  2. Mount a big NFS/CIFS drive.
  3. Copy the MBR:
    dd if=/dev/sda of=/cifs/sda.mbr count=1 bs=512
  4. Copy the partition table from the drive:
     sfdisk -d /dev/sda > /cifs/sda.sfdisk
  5. Run partimage on each partition on the drive
  6. Finally, for good measure,
    dd if=/dev/sda | gzip > /cifs/sda.dd.gz

You can use kill -USR1 pid on the dd process id (not the gzip process id) to see progress.

Most of the restore is straightforward. sfdisk can take its output as input; partimage has restore built in. To decompress the gzip dd image, use:

gzip -dc /cifs/sda.dd.gz | dd of=/dev/sda

Incidentally, a good site for dd information is here:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: