Is there a way to browse Clonezilla images and extract individual files from them without restoring the whole image?
7 Answers
Better use the partclone utility instead:
cd /home/partimag/YOURIMAGE/- Depending on compression method used:
- If the image is compressed with gzip:
cat dir/hda2.ntfs-ptcl-img.gz.* | gunzip | partclone.restore --restore_raw_file -C -s - -o hda2.img
- If the image is compressed with zstd:
zstdcat dir/hda2.ntfs-ptcl-img.zst.* | partclone.restore --restore_raw_file -C -s - -o hda2.img
- If the image is compressed with gzip:
mount -o loop hda2.img /mnt -t ntfs -o ro
Note: This needs to be done as root, since partclone requires root permissions to write the image, and the mount command will likely only work as root.
For zst images you'll need to install zstd (e.g. apt install zstd)
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 02 '17 at 16:09
-
8as of may 2017,
partclone.restoreneeds--restore_raw_fileflag to write to.imgfile. – biocyberman May 27 '17 at 12:51 -
3In-case anyone else has the same problem: I needed to use
ntfs-3g -o loop hda2.img /mntinstead ofmount– ashleysmithgpu Apr 25 '18 at 10:25 -
2@biocyberman I've edited the answer (pending review) to include this option, as I just hit the very same problem! :) – David Gardner Aug 22 '19 at 09:58
-
3I don't think zcat is the best choice, as it expects each file to be individually gzipped, while it's really just one long gzip stream split into separate files (at least in my old backups, maybe this is no longer the case). This can result in a "gzip: unexpected end of file" error.
cat | gunzipworks. – hcs Oct 07 '19 at 15:58
You should be able to mount your CloneZilla image to extract files from it. See instructions here.
Prepare a large disk in Linux
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.aato 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 /mntThen all the files are in /mnt/
Note: For lzo images, replace gzip -d -c with lzop -d -c
- 39,024
- 6
- 82
- 116
-
8
-
1The 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 03 '15 at 09: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 -cfrom your command withzcat. Likewise, for a bzip2 archive, one could usebzip -d -c, orbzcat. – cp.engr Jan 20 '18 at 21:09 -
-
Step 1 is very unclear. What does it mean to "prepare a large disk in Linux"? Or do they simply mean to make sure you have enough free space for the hda1.img file? – Jon Bentley Apr 25 '20 at 20:02
I've written a program called clonezilla-util which can mount Clonezilla archives in Windows.
You can mount to a drive letter using this command (requires the Dokan driver):
clonezilla-util.exe mount --input <clonzilla folder> --mount L:\
Then you can access the files in explorer:
Alternate approach
If you don't want to use the Dokan driver, you can extract the partition images using this command:
clonezilla-util.exe extract-partition-image --input <clonzilla folder> --output <folder to extract to>
That creates a file for each partition in the Clonezilla archive.
You can then use 7-Zip to inspect the contents:
- 422
-
1
-
-
clonezilla-util version 2.0.4 failed to open my
dd(savedisk) image of a Windows OS drive (NTFS). I must admit that the possibility to mount the Clonezilla image without having to unpack it looks very attractive, though... – Igor Nov 13 '23 at 14:29 -
1Thanks for the raising the issue over on Github Igor! I'll look into it.
https://github.com/fiddyschmitt/clonezilla-util/issues/49
– Fidel Nov 14 '23 at 08:46 -
1I can confirm that clonezilla-util version 2.1.0 worked for my
ddimage. Thanks Fidel! – Igor Jan 19 '24 at 12:16
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
- 311
-
1How do instructions for restoring a full disk backup answer the question of extracting individual files without restoring the whole image? – squillman Nov 06 '13 at 01: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.
- 2,595
7-Zip can unpack most images (which looks much like unpacking a regular .zip archive).
It supports almost all common filesystems (FAT, NTFS, ext3, ext4,...).
Note that for compressed multi-part images (those like sdb2.dd-ptcl-img.gz.aa .. sdb2.dd-ptcl-img.gz.ck) you would need enough empty space on your disk to unpack the image from the archive first.
- 161
- 1,286
-
1Thanks 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
-
One issue is that clonezilla created multiple compressed files. Decompressing them individually is no good, they need to be combined – Gogowitsch Aug 29 '21 at 15:40



debugfsfor ext*fs) andpartclonecan't restore to stdout to pipe data to such a command. So you'll need to extract the whole image and mount it. – David Gardner Aug 22 '19 at 10:10partclone can not restore to pipe, it canSending data to pipe line is also supported ONLY for back-up. I think it is because random access write operations on restore target in partclone code – user1742529 Dec 25 '19 at 08:01