I have a large Clonezilla image of a CentOS server that had a 500GB drive partitioned into boot, OS, and data partitions.

I would like to mount the backup image so I can extract some files as I no longer have suitable hardware or space for a VM to restore it to.

In the main directory of the backup, I have the following gzip'd files:

# ls -lh *gz*
-rwxrwxrwx 1 root root  13M Sep 19 11:30 sda1.ext3-ptcl-img.gz.aa
-rwxrwxrwx 1 root root 2.0G Sep 19 11:40 VolGroup00-LogVol00.ext3-ptcl-img.gz.aa
-rwxrwxrwx 1 root root 2.0G Sep 19 11:44 VolGroup00-LogVol00.ext3-ptcl-img.gz.ab
-rwxrwxrwx 1 root root 2.0G Sep 19 11:46 VolGroup00-LogVol00.ext3-ptcl-img.gz.ac
-rwxrwxrwx 1 root root 1.1G Sep 19 11:49 VolGroup00-LogVol00.ext3-ptcl-img.gz.aad

According to this blog post I should combine the files into one gzip file using:

cat sda1.ext4-ptcl-img.gz.a* | gzip -d -c > sda1.img

Are all the above files the ones I should combine, or is sda1 unecessary? Presumably as they are clones with partclone in ext3 format the following command should work too?

partclone.extfs -r -s sda1.img -o sda1-extfs.img --restore_raw_file
  • 2
    I removed the image-manipulation as this has nothing to do with image file manipulation (photo/grahics). I know you did not originally put it there, but you accepted that inappropriate edit.
    – Anthon
    Sep 21 '14 at 11:58
  • Depending on the compression used the command could be $ bzcat *Vol00* > ../VolGroup00-LogVol00.ext3-ptcl-img Jan 31 '18 at 9:56

The cat command is not going to help much, because none of the 5 files you list matches the sda1.ext4-ptcl-img.gz.a* pattern.

To get the image from sda1.ext3-ptcl-img.gz.aa you can probably do just

cat sda1.ext3-ptcl-img.gz.aa | gzip -d > sda1.img

Without a wildcard. AFAIK Clonezilla always "number" the files as it doesn't know up front in all cases if more than one file is necessary (i.e. because of compressed filesize over 2Gb).

It is unlikely that you can successfully combine the first file with the other 4 files, but you should be able to combine the other 4 and gzip -d the combined result.

  • Looks like I need to use partclone. Any idea how to install it on CentOS?
    – blarg
    Sep 23 '14 at 14:57
  • I'm using Ubuntu so I cannot check but I assume yum install partclone. After that you should have some commands in /usr/sbin (to be executed as root). Why do you think you need it, are you sure that you do and/or have you tried to restore without. I think you are looking at 2 partitions. One normal (the first file) and one logical volume the rest combined. It would be really bad if you could't apply some basic commands to get this stuff back (i.e. cat, gz and tar.
    – Anthon
    Sep 23 '14 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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