[SOLVED] Automatic restore from a PBS instance

Taledo

Member
Nov 20, 2020
72
5
13
53
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.
 
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.
 
I have exactly the same question. And I wonder why this is marked as "solved"
Discussions above are about how to run a CLI manually for recovering from PBS.

If I want to automate the entire process of recovering a VM from PBS when this VM goes down on a node,
is there a hook that is called when a VM goes down? Is there a way to integrate my custom script into the hook?

I am curious....
 
Last edited:
Hey there.

I marked it as solved because I didn't need help with my issue any more. Sorry if that was misleading.

I'd recommend opening a new thread with your specific use case, as it seems to differ from mine.

Best Regards
 
Hi, Taledo.
I appreciate your response even when the post has been inactive for many years.
I'm glad to hear that you were able to solve your problem on your own.

I followed your recommendation and opened up another thread.
Thank you again.

Regards.
 
  • Like
Reactions: Taledo

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!