[SOLVED] Automatic restore from a PBS instance

Taledo

Member
Nov 20, 2020
40
4
13
52
Good morning everyone.

I'm looking at creating a test environment on a new Proxmox server (which we'll call server TEST) using some VMs from another Proxmox server (which we'll call server PROD).
Those servers aren't in the same cluster.

Currently, PROD can backup to a PBS instance, and TEST can restore from it. I've tried it manually, everything works great.

Is there a way to automate, via Ansible, the API, or a bash script, the restoration of multiple VMs from the PBS to TEST? The idea is to be able to "reset" TEST with a clean & current version of the VMs on PROD (which periodically backups to PBS, so that's taken care of), with minimal interaction needed.

I've looked at the API but it needs a specific filename for the restore file, and as such it can't be automated easily (or so I think).

Cheers.
 

Taledo

Member
Nov 20, 2020
40
4
13
52
Yes, I'd like to use those tools. I can get the list of the snapshots on the PBS via the proxmox-backup-client command, but I'm stuck at how I can restore the VM from that, either with the restore command in proxmox-backup-client itself or with qmrestore.
 

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 your own in 60 seconds.

Buy now!