Is there a way to browse CloneZilla images and extract individual files from them without restoring the whole image?

  • Important note: Bounty is for providing a working method for extracting files from WINDOWS - as the *nix version below seems to work well already – Mark Henderson Jan 16 '11 at 0:23
  • Why not use the *nix method on windows using Cygwin? – Joe Jan 17 '11 at 18:00
  • @Mark Henderson, is firing up a Linux VM an option? Do you have cygwin on your Windows box? – Zoredache Jan 21 '11 at 0:46
  • @Zoredache - A Linux VM is an option, but not an ideal one. Does cygwin include "mount"? If it does then that's always worth a shot. FWIW this time around I simply restored the image into a VM and extracted them from there, but that seemed like a round-about kind of way of getting a single file. – Mark Henderson Jan 21 '11 at 0:59

You should be able to mount your CloneZilla image to extract files from it. See instructions here.

  1. Prepare a large disk in Linux

  2. Say if your image is /home/partimag/YOURIMAGE/, and the image is /home/partimag/YOURIMAGE/hda1.ntfs-img.aa, hda1.ntfs-img.ab... run

    file /home/partimag/YOURIMAGE/hda1.ntfs-img.aa
    

    to see it's gzip, bzip or lzop image. Say it's gzip, then you can run

    cat /home/partimag/YOURIMAGE/hda1.ntfs-img.* | gzip -d -c | ntfsclone --restore-image -o hda1.img -
    

    Then you will have a "hda1.img" which you can mount it by

    mount -o loop -t ntfs hda1.img /mnt
    

    Then all the files are in /mnt/

  • 6
    Any way to do this in Windows? – Pretzel Apr 19 '10 at 1:06
  • 1
    The commands look sane, but when I try them I get an ERROR: Input file is not an image! (invalid magic). What could cause it? – PetaspeedBeaver Oct 3 '15 at 9:13
  • If you used CloneZilla with parclone it will not recoved using ntfsclone. Use the command from hal below. – Mendes Dec 12 '15 at 21:58
  • Sidenotes: for a gzip archive, one could replace gzip -d -c from your command with zcat. Likewise, for a bzip2 archive, one could use bzip -d -c, or bzcat. – cp.engr Jan 20 at 21:09

Better use the partclone utility instead:

  1. cd /home/partimag/YOURIMAGE/
  2. touch hda2.img
  3. cat dir/hda2.ntfs-ptcl-img.gz.* | gzip -d -c | partclone.restore -C -s - -o hda2.img
  4. mount -o loop hda2.img /mnt

See also CloneZilla FAQ Entry: "How can I restore those *-ptcl-img.* images into a file manually?"

  • how can I unencrypt it before ungzipping? I know the passphrase, but the command. – antivirtel May 2 '17 at 16:09
  • 3
    as of may 2017, partclone.restore needs --restore_raw_file flag to write to .img file. – biocyberman May 27 '17 at 12:51
  • In-case anyone else has the same problem: I needed to use ntfs-3g -o loop hda2.img /mnt instead of mount – ashleysmithgpu Apr 25 at 10:25

I've made a video that demonstrates how to restore the full disk backup into a virtual machine. Hope it helps: http://www.youtube.com/watch?v=ainjV3X6wqQ

Basically, what you need to do is:

  • Create a VM in VirtualBox (free)
  • Create a virtual disk image for the VM with at least the same size of the backed up disk
  • Store your clonezilla backup in an external HDD or something which can be accessed from the VM
  • Run your VM with the clonezilla ISO in its virtual drive
  • Restore the backup like you would in a real machine
  • How do instructions for restoring a full disk backup answer the question of extracting individual files without restoring the whole image? – squillman Nov 6 '13 at 1:17
  • He might need to access stuff that isn't browsable through the filesystem. For example, I had to access my clonezilla backup to export an .SQL file from phpMyAdmin. This was the best way I found to do it. – Pedro Moreira Dec 10 '13 at 15:04

Taken from this article:

There are some limitations. As pointed out earlier, Clonezilla can't restore an image to a drive that is smaller than the original drive. It also doesn't allow for retrieving specific files in an image, it's the whole partition or nothing.

Since the Linux way is pretty much a lucky hack, I'd wait until this feature is officially developed for Windows.

Try this software:

http://www.mountimage.com/

It looks like it could do it. 14 day trial.

  • 1
    Thanks for the answer, unfortuntately I've already tried this software. The problem is that the clonezilla images are compressed with GZip. I was able to uncompress the GZipped files, but mountimage didn't know what to do with them. – Mark Henderson Jan 17 '11 at 22:28
  • What was the extension that you have after you uncompress the GZ files? – JohnThePro Jan 21 '11 at 18:14

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.