Can I restore a single partition from a Clonezilla disk image?

14,445

Solution 1

Yes, just use for restore image from Clonezilla:

cat sda5.ext3-ptcl-img.gz.a* | gunzip -c | partclone.restore -d -s - -o /dev/sda5

Solution 2

I just had to restore a partition from one of my image backups.
Steps:

  1. As my backup was to an external nfs drive, I booted of the clonezilla cd,

  2. start clonezilla

  3. select device image

  4. select nfs-server, static

  5. I configured my nfs drive to use clonezilla defaults, so I just hit enter several times, you may have to enter ip's, masks, shares, etc.

  6. select EXIT - command line

  7. select cmd

  8. sudo bash (become root, or you won't be able to backup

  9. cd /home/partimag

  10. ls - determine where your backup is, and then cd to that directory

  11. my partition was an ext4 partition, so my recover string was -

cat sda9.ext4-ptcl-img.gz.a* | gunzip -c | partclone.restore -d -s - -o /dev/sda9

  1. then exit and reboot.

Worked great for me. Only advice I have - if you have spare hardware to perform restores, practice. A wise man once told me "Any idiot can do backups, but it takes a genius to successfully restore"

Solution 3

If you make a backup of all your partitions, you should have all data.

Clonezilla will also create a backup file of your MBR and how your partition table is set up.

If you have no weird copy protection system or something installed on your computer (that would save license information if supposedly free blocks for example) then the partition backup should be fine.

Share:
14,445

Related videos on Youtube

Glutanimate
Author by

Glutanimate

Updated on September 18, 2022

Comments

  • Glutanimate
    Glutanimate over 1 year

    I was thinking of performing a Clonezilla backup and was wondering what backup mode to choose. Generally speaking, Clonezilla offers the following backup options:

    • savedisk: Save a full disk image
    • saveparts: Save images of specific partitions

    Correspondingly there are two restore modes:

    • restoredisk: Restores full disk image
    • restoreparts: Restores partition images

    What I am looking for is a hybrid of these two options. I would like to be able to both restore specific partitions and restore my full hard drive in case of a total failure. Does Clonezilla support this restoration pathway out of the box?

    So far I haven't been able to find any official documentation regarding this. The only reference I did find was a mailing list discussion from 2010 which pointed to imgconvert, a custom script which can supposedly convert disk images to partition images. Unfortuantely I have no idea if this script still works. After all it's 5 years old.

    That's why I wanted to ask here if anyone had any experience with this use case of Clonezilla and could vouch for this solution (or a different one, for that matter).

    • Admin
      Admin over 9 years
      A suggestion: Exactly this unflexibility which means, you had to avoid such thrash under any circumstances. May I suggest a little bit of playing with the dd command?
    • Admin
      Admin over 9 years
      @PeterHorvath While I do understand that dd and other coreutils are far more flexible, I would prefer to find a Clonezilla-based solution as it would save me a lot of time.
    • Admin
      Admin over 9 years
      If you have a disk image (without any internal compression, etc) the kpartx tool can separate it into its induvidual partitions. And probably you can get this image with the imgconvert tool. If you don't get an useful answer, maybe it were an useful direction to start. Good luck!
  • Helen Craigman
    Helen Craigman about 7 years
    I apologize for not understanding. Assume I backed up two disks (let's say, C: and E: (let's say, /dev/sda and /dev/sdc)) into a joint Clonezilla image. Later, I then want to restore a single one of them only, from the joint image. What command should I give?
  • Helen Craigman
    Helen Craigman about 7 years
    2. And what if the backed-up disk is large, and in the directory there are files like: sda5.ext3-ptcl-img.gz.a*, sda5.ext3-ptcl-img.gz.b*, sda5.ext3-ptcl-img.gz.c*, .etc? (How to build the "cat" command?) 3. I read somewhere that the command: "partclone.restore" is deprecated, and you should use "partclone.ntfs", "partclone.ext4" , etc., according to the file type?