Re: Mount and Extract files from images
TL;DR: +1 for this feature
Since I started using Fog around 2017 there have been several occasions where it would have been really handy to be able to decompress and mount a Fog image so I can grab a few files or folders from it. I tend to use Fog for backing up old machines just as much as deploying new ones. Right now I’ve got a dummy VM on a lab server set to boot from the network and I’ll deploy an image to it when I need to recover something. This works OK, and I usually end up just mounting the .vhdx to another test VM as a secondary drive so I can browse and copy what I need. It just takes a while when I have an image that is several hundred GB and I only need one file from it. I know even if this were done on the Fog server it would still have to decompress and extract the entire image, but it would be nice if this could be automated. It would eliminate a lot of image juggling and deploying and potential human error.
I’ve spent the last two days trying to figure out how to mount a Fog image in Ubuntu 16 Server. I can decompress it but partclone always gives some kind of error or tells me I need almost an exabyte of memory. Here is what I’ve tried:
sudo -i
cd /images/_Windows10Prox641909
touch d1p4.extracted.img
cat d1p4.img | zstd -dcf | partclone.restore -C -s - -O /d1p4.extracted.img --restore_raw_file
and here is what I get:
Partclone v0.2.86 http://partclone.org
Starting to restore image (-) to device (d1p4.extracted.img)
There is not enough free memory, partclone suggests you should have 820488013636592786 bytes memory
Partclone fail, please check /var/log/partclone.log !
I’ve come across several examples of this being done as well as different ways to do the same thing, but none of them have worked for me. If I could figure out what partclone needs or figure out the correct syntax I could script the process and make it a bit less painful. I’ve also tried partclone.ntfs
instead of partclone.restore
but it gives the same results. This Ubuntu box has 2.17 TB free space so there should be plenty of room to extract the entire image to a raw file. d1p4.img
is a 127 GB NTFS partition in this case.
Thank you for your time and consideration.