Restore VM from PBS backup to PVS storage with newer snapshot

mindio

New Member
Jul 9, 2023
14
0
1
Hi All,

So I have 2 PVE node cluster. PVE1 is the main one, where VM's are running, and PVE2 runs only virtualized PBS with passed-through SATA controller and disks. PVE2 also has some additional NVME storage where I can migrate to or restore VM's from PVE1 or PBS.
I am doing VM backups to PBS every night. But also every 30 min. I am replicating VM storage from PVE1 to PVE2, this way if needed, VM (live)migration happens very quickly.
In case of PVE1 failure, I have very fresh 30 min. old VM storage snapshots on PVE2, but no VM's itself. If I restore VM's from PBS (which is up to 1 day older) to the same storage, will PBS recognize there are newer snapshots already exist on the disk and keep it?

Thanks
 
No, the restore functionality will recreate the backup that you provided and then either reuse or create a new VM, which depends if you have changed the vmid when restoring it. That is, it will not do any checks about the differences between the current state of a VM and a backup of it, as the restore functionality is for disaster recovery. You would need to check the modification timestamps themselves.
 
In case of PVE1 failure, I have very fresh 30 min. old VM storage snapshots on PVE2, but no VM's itself.
If you are sure that PVE1 is down you can simply move the configuration file like this: mv /etc/pve/nodes/PVE1/qemu-server/<vmid>.conf /etc/pve/nodes/PVE2/qemu-server/. A few seconds later that <vmid> will popup in the WebGui for PVE2.

Look into those folders, you will learn some interesting "under the hood" facts.

Disclaimer: this is the Danger Zone - one "wrong" command can destroy your whole cluster! Do not tamper without having backups!

Please note that a "2 PVE node cluster" is a problem in itself; that topic is discussed here every few days - search for it.
 
  • Like
Reactions: wbk

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!