[SOLVED] How to restore a vm from PBS to PVE via script ?

SRU

Member
Dec 2, 2020
38
4
13
24
Hi,
Sorry but i can not work it out myself.
For monthly restore tests, i like to restore a complete infrastrukture of 10..20 VMs by script.

I am able to restore individual files from the snapshot in question, i.e:
Code:
PBS_REPOSITORY='...' \
PBS_PASSWORD='...' \
proxmox-backup-client restore 'vm/3033/2022-03-01T10:47:00Z' qemu-server.conf /root/qemu.conf --keyfile /etc/pve/priv/storage/....enc

But that does not help with restoring a complete VM as the GUI does.
I found the command in the GUI log, but it seems to rely on a device to be created in before:

Code:
/usr/bin/pbs-restore vm/3033/2022-03-01T10:47:00Z drive-scsi0.img.fidx 'rbd:rzcluster/vm-303033-disk-0:conf=/etc/pve/ceph.conf:id=admin' --verbose --format raw --keyfile /etc/pve/priv/storage/....enc --skip-zero

Thus this does not work out either.

Thanks for your efforts in advance ;) !
 
Last edited:
i am answering my question:

Code:
#List storages
pvesm status

# find a snapshot in the storage, here a proxmox backup server type
pvesm list prxbk01.womedia.de | grep 3033

# Restore this to a new vmid.
qmrestore 'prxbk01.womedia.de:backup/vm/3033/2022-03-01T10:47:00Z' 313033
 
  • Like
Reactions: bobmc

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!