quick backup on samba share

The following are instructions on how to backup an entire partition from a network connected machine onto a samba share. The backed up partition can be from Windows or Linux. The samba (cifs) share can also be a Windows share.

Samba machine is at and share name is void.

  • Burn sysrescuecd on a disc
  • Boot sysrescuecd on the machine to backup
  • Press enter at boot prompt
  • dhclient eth0 (assuming it only has one network interface)
  • mount.cifs \\\\\\void /mnt/backup
  • partimage
  • select appropriate partition, backup to file /mnt/backup/snit, no compression (where snit is backup file name)
  • wait

Do not disable file splitting, keep it at 2GB default. I’m not sure why but it won’t work if you don’t split files.

It may be a good idea to compress the resulting files afterwards using 7z (or whatever) if you’re short on disk space. You could use compression directly from partimage but I like to keep backups as fast as possible (and my samba server has a faster CPU than most machines I backup from).

Restoring the partition is done in a similar manner. Just choose restore instead of backup to file in partimage first menu.

partimage restore on vm

download, install and start virtualbox
make new vm with enough space to restore everything (see partimage imginfo machine.000, replace machine with backup name)
boot sysrescuecd on vm

dhclient eth0
mount.cifs \\\\\\void /mnt/windows

create default partition table
create new partition of appropriate filesystem type and set boot flag

partimage restore /dev/sda1 /mnt/windows/machine.000

accept 100 dialog boxes