Main menu

  1. You need a file to mount as a HDD device - using DD, the following will instantly create a file of SIZE Gigabytes:
    • dd if=/dev/zero of=myharddisk.img bs=1000 count=0 seek=$[1000*1000*SIZE]
  2.  You need to make this file look like a block device (Choose a free /dev/loop device):
    • losetup /dev/loop0 myharddisk.img
  3. Start partimage manually from the command line, pointing to your loop device
    • partimage /dev/loop0 backupfile.000
  4. Remove the file from the loop device
    • losetup -d /dev/loop0
  5. Mount the new file on a directory
    • mount myharddisk.img /path/to/dir -o loop
  6. Enjoy the backup's files


0 #2 Andrew M 2010-01-21 18:09
I believe Step 3 should be "partimage restore /dev/loop0 backupfile.000"

Thanks for the nice tutorial. You might appreciate this master-class level use of loopbacks and kvm here:
0 #1 gbd 2008-10-18 10:38
It looks great tip. But in my particular case, I have no device with sufficient space to uncompress my backup (I want to restore from the bzipped backup of my largest device).

Don't you know a way of directly mounting my partimage file or its uncompressed version?

Add comment

Security code