Proxmox NFS Backup/Remote Snapshots

n1nj4888

Well-Known Member
Jan 13, 2019
162
22
58
45
Hi there,

I currently have some VMs which are hosted on and run from a shared NFS share by the Proxmox hosts.

I currently use Proxmox to backup (snapshot) these VMs back to the NFS share but this seems inefficient with the reads from NFS -> PVE host and writes back from PVE -> NFS host.

Given the NFS host is a Synology running BTRFS and supporting local snapshots, I wondered:

(1) Can I simply snapshot the qcow2/raw using synology without having to stop / freeze / shutdown the running VM on the Proxmox host or could this cause data inconsistencies in the snapshot if ever I have to restore the snapshot?

(2) If I can use the snapshot on the synology but should stop / freeze / shutdown the running VM first, is there a recommended way to do this at a certain time? For example, could I write a script to run on the NAS that connects to the PVE host, freezes the VM, Snapshots it on the synology and then unfreezes the VM?

Thanks!
 
Hi,

Generally keep in mind a snapshot is not a backup and you should keep one backup on a different system.
The external System could be an external HDD.

(1) Can I simply snapshot the qcow2/raw using synology without having to stop / freeze / shutdown the running VM on the Proxmox host or could this cause data inconsistencies in the snapshot if ever I have to restore the snapshot?
To have a consistent VM FS you have to turn off the VM.
You have to ensure that the VM kernel cache is empty to have a consistent snapshot.

(2) If I can use the snapshot on the synology but should stop / freeze / shutdown the running VM first, is there a recommended way to do this at a certain time? For example, could I write a script to run on the NAS that connects to the PVE host, freezes the VM, Snapshots it on the synology and then unfreezes the VM?
The correct way to do a proper snapshot is.
1.) call qemu-guest-agent to freeze the fs
2.) if the agent approves the freeze make the snapshot
3.) unfreeze the fs with qemu-guest-agent
Yes, you can write a script for that
 
Thanks for the detailed answer! I’ll take a look around for example scripts and give it a shot!

Thanks again!
 

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!