Restore Files or Folders directly to VM

May 4, 2021
107
4
38
44
Hello Proxmox-Team and Proxmox-Community!

I am in the process of closing the remaining open tickets before the end of the year, ideally because I have found a solution. This one is still open: I can browse the backups on my backup server via the PVE Web Interface and select individual folders or files, which are then downloaded to my workstation. Afterwards I have to re-upload the files via rsync to the server where I wish to restore them. My connection is a measly 50Mbits down / 10Mbits up, so restoring a large file - for example an mysqldump - takes ages to upload and the Backup Server is connected via 10 Gbits to the PVE-Nodes, so restoring directly would be much, much more efficient.

Is this currently possible? If yes please give me an example how to restore a Folder directly to the VM on the shell? If no, please consider this a wish for 2023. Ideally it would be in the form of a dialogue where one could select multiple folders and files and then restore them directly to the server with one click of the button.

Yours sincerely
Stefan
 
Hi,

you should be able to use the proxmox-file-restore utility to restore a file from a backup to your PVE host directly. That should save you some time.
 
You can list the contents of a backup and then restore them with:

  • list: proxmox-file-restore list <snapshot> <path> (e.g.: proxmox-file-restore list vm/100/2022-12-07T13:55:39Z /drive-scsi0.img.fidx/part/3/
  • restore: proxmox-file-restore extract <snapshot> <path> - > $fileName (e.g.: proxmox-file-restore extract vm/100/2022-12-07T13:55:39Z /drive-scsi0.img.fidx/part/3/bin/ls - > ls)
Be sure to follow the somewhat strange - > $fileName "convention". This might be a bug but I couldn't get it to work otherwise.
 
Last edited:
Oh also be sure to export the PBS_REPOSITORY, PBS_PASSWORD and, in case your PBS is using a self-signed certificate, also the PBS_FINGERPRINT variables. They are described in more detail in the documentation [1].

[1]: https://pbs.proxmox.com/docs/backup-client.html
 
Last edited: