the Backup

adn

New Member
Dec 11, 2019
4
0
1
26
Hi y'all , I'm pretty new with the proxmox V machine thing
and need to get certain files from the back up I did on an external Drive
I have the External Drive right now connected to my Linux client machine (I have windows as well).
is there a way to extract files from this backup I have ?
Ps: Backup file is .vma
 

Dominic

Proxmox Staff Member
Staff member
Mar 18, 2019
299
32
28
You did a backup of a VM in PVE and now want to recover some files that are somewhere in this VM on another Linux (not PVE) machine?
Restoring the backup on PVE in the GUI and copying/sending the files from there might be the easier solution. There is some information on the VMA format in our wiki.
 
Mar 19, 2018
107
9
18
I'm not clear what you want to do, exactly, but:

If you have a vma (backup) then you can restore the backup as a new VM, running in parallel with the current VM.
In Proxmox, go to the Storage where the backup is held, and you'll see you can restore it as a new VM with a new IP. Be sure to select the tick box option that generates unique identifiers and MAC addresses etc otherwise you'll have network problems with both the old and the new VM.

I suggest disconnecting the network on the restored VM before you spin it up. Then start it, login as root via the console, edit the IP address so that it does not conflict with an existing IP, shutdown, reconnect the network, then spin it up again. You now have a clone of your original VM with a new IP.
NOTE: If you have licensed software running on the VM that calls home, you may want to firewall the new VM to prevent it connecting to anything but your own IP while you collect the files you want from it.

Another option you can use is to extract the raw disk image form the backup, and mount it on the node (or another VM if you don't have conflicting disk UUIDs of LV/VG names).

Mounting on the node would be something like this: (from my notes! Be careful!!!!!!!! Use at your own risk):

lzo -x backupname [decompresses the lzo compressed backup]
vma extract filename targetdir [extracts the disk image from the now uncompressed backup]
modprobe nbd max_part=63 [creates network block device that you will use to mount the image]
qemu-nbd -c /dev/nbd0 image.img [umm...qemu magic of some sort to allow the image to be mountable]
mount /dev/nbd0p1 /mnt/image [mount the image. create the directory if you get errors when doing so]
NOTE: nbd0p1 is device 0 partition 1. If your backup contains multiple partitions, it may be that you want a different one to "1". Thus you might need to use p2 or maybe p0 if it exists (not sure to be honest).

(If I remember correctly, "filename" is the name of the uncompressed image from lzo command. "Targetdir" is where you want the extracted disk image to be stored. "image.img" is the name of the resulting disk image you get from the vma extract command).


Work with the mounted image on host, copy your files. Then unmount and remove extracted uncompressed backups and images

umount /mnt/image
killall qemu-nbd
rm image.img
rm extracted_vma_file_name.vma

Be very careful with all this. You can do damage if any of my notes are not correct or my explanation or understanding is wrong.
 
  • Like
Reactions: Dominic

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!