power backup & restore with dd and losetup

Backup:

  1. boot with knoppix
  2. mkdir /storage && mount storage:/backup
  3. dd if=/dev/hda of=/storage/laptop.img
  4. wait....
  5. done

Restore:

  1. ssh root@storage
  2. fdisk -lu /backup/laptop.img ### write down the first sector of the desired partition, say 1959930
  3. mkdir /samba/laptop && mount -o loop,offset=$[1959930*512],ro,user /backup/laptop.img /samba/laptop
  4. grab a beer and see it at \\storage\samba\laptop :)

Linux rulez!

Comments are closed.