PBS to PVE - manual vm restore

Leo David

Well-Known Member
Apr 25, 2017
115
6
58
45
Hello everyone,
I have the following setup:
1. Local PVE is doing backups on local PBS
2. Local PBS is syncing the datastore to Remote PBS over the internet.

My question is:
In case of a total disaster on the "local" site, it would be more time cost effective:
1. Export remote PBS's vm backup on some external media
2. Driving to the damaged local site
3. Reinstall PVE from scatch
4. Reimport the vms from the external media

This would be pretty simple to be done in case of using classic backup ( not using PBS ) , and moving the vm backup archive around the place.
But in case of having a PBS based backup implementation, what would it be the steps ?
Or to be more specific, how can I export ( by cli ) a vm backup from PBS to an external mounted media in a such a form that will allow me to quickly import it on a fresh installed PVE ?
Please let me know your thoughts.
Thank you,

Leo
 
you can use the client for that:

Code:
proxmox-backup-client restore <snapshot> <archive-name> <target>

with that you can restore the vm images into a directory
 
Thank you so much for your answer.
I am still not sure what would it be the exact procedure. If we look into the datastore, we can see:
Code:
#  ls -la
drwxr-xr-x     4 backup backup      82 Nov 15 00:07 .
drwxr-xr-x     4 root   root        34 Jul 13 13:30 ..
drwxr-x--- 65538 backup backup 1069056 Jul 13 13:29 .chunks
-rw-r--r--     1 backup backup     338 Nov 15 00:07 .gc-status
-rw-r--r--     1 backup backup       0 Jul 13 13:29 .lock
drwxr-xr-x    23 backup backup     325 Jul 14 01:59 vm



# tree
.
└── vm
    ├── 100
    │   ├── 2021-11-13T18:00:02Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   ├── 2021-11-14T18:04:31Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   └── owner
    ├── 101
    │   ├── 2021-11-13T18:00:51Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   ├── 2021-11-14T18:05:19Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   └── owner
    ├── 102
    │   ├── 2021-11-13T18:05:09Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   ├── 2021-11-14T18:09:39Z
    │   │   ├── client.log.blob
    │   │   ├── drive-virtio0.img.fidx
    │   │   ├── index.json.blob
    │   │   └── qemu-server.conf.blob
    │   └── owner
... and so on

So for example, if I need to manually import latest backup of vm "100" to a fresh installed PVE, what would it be the exact procedure ?

1. ON PBS:
Copy whole "100" directory to an external mounted media

2. ON FRESH PVE:
Mount the external media containing the files and run:
"proxmox-backup-client restore <snapshot> <archive-name> <target>"
- what is the "snapshot" in this case ?
- what is the "archive-name" in this case ?
- i assume "target" is the destination storage for the vm's disks

I think i've got a bit confused, could you please a bit more specific ?
Thank you so much for help,

Leo
 
ok, i think my answer may was too short..

i think the easiest way to restore in a disaster (like you described) is to setup a new pve, and configure the remote (off-site) pbs as storage and directly restore from that

if that is too slow, you can copy the whole datastore on a disk and setup a local pbs too and copy the content of the datastore there

in any case, you cannot just copy the directories off the datastore, since they group/snapshot folders only contain metadata, the actual chunks are in a '.chunks' folder in the datastore

if you really want to export the images from the remote pbs to a disk, you'd use the 'proxmox-backup-client' directly on the offsite pbs server
then on the pve server you can copy/mv/import the disk into a vm

if you want more specific infos on how to use the backup-client, please see the documentation: https://pbs.proxmox.com/docs/backup-client.html

if something is then still unclear, please ask :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!