Making a Ghost-style backup image
From Wiki
Symantec Ghost is a very convenient way of taking a full backup of a computer's operating system and data in one operation. By using partimage, one can imitate this style of backup without need for Microsoft Windows or a Bart PE disc.
Backing Up
- Boot from a live cd or USB key; I'm using Ubuntu 9.10.
- Uncomment all repos in
/etc/apt/sources.list - Make sure
partimageandnfs-clientare installed. - Mount some storage, such as an NFS share:
# mount san.spruce:/data /mnt # cd /mnt
- Back up the MBR (master boot record):
# dd if=/dev/sda of=nc10-sda-mbr.img count=1 bs=512
- Back up the partition table:
# sfdisk -d /dev/sda > nc10-sda-partitiontable.img
- Now use
partimageto back up the actual partitions. Remember, unlike Ghost, partimage only backs up individual partitions, not whole disks!
# partimage
- I prefer to split the files at 700MB in case I need to move them onto CD-R. It is helpful to give the files names like
nc10-sda1-windowsxp.img,nc10-sda2-ubuntu-root.imgas this makes it less confusing when it's time to restore.
Restore
- As before, boot from a live cd or USB key.
- Uncomment all repos in
/etc/apt/sources.list - Make sure
partimageandnfs-clientare installed. - Mount some storage, such as an NFS share:
# mount san.spruce:/data /mnt # cd /mnt
- Restore the MBR if needed:
# dd if=nc10-sda-mbr.img of=/dev/sda
- Restore the partition table if needed:
# sfdisk /dev/sda < nc10-sda-partitiontable.img
- Use
partimageto restore the desired partitions:
# partimage
- Reboot and cross your fingers.
