Dec. 26, 2007
Restore only some files from a partimage backup
By AkH, 2 years, 7 months ago, modified Dec. 26, 2007
One month ago I've deleted some files in a terrible mistake :)
On my personal server (dedibox) I'm using partimage to backup the / only, it's a nice tool that provide a way to restore a bootable partition from a backup, very usefull for a remote administrated server.
But my need was only to restore some missed files (without restore all the /), at this time I don't think partimage is capable of that, one solution was to create a virtual partition and let partimage restore in it:
# first create a file large enough to contains all the files (and the filesystem metadata) dd if=/dev/zero of=bigfile count=6144000 bs=1024 # load the kernel module modprobe loop # assign loop0 to your bigfile losetup /dev/loop0 /opt/data/bigfile # restore partimage restore /dev/loop0 /root/aton.sda2.partimg-20071020.gz.000 # mount your virtual disk mount /dev/loop0 /mnt #copy your files umount /mnt losetup -d /dev/loop0
Thanks to SR for the idea

