Sync VMs, but not complete disks, only differences to other proxmox host?

Oct 21, 2024
21
1
3
I have two standalone Proxmox VE nodes, one is the main node with the running VMs, the other is standby, in case something happens to the first node or the VMs on it.

Every night, I sync the VMs from the main node to the standby node via vzdump, ssh, qmrestore with the following commandline which works great:


Code:
vzdump 102 --stdout --compress=zstd | ssh 10.10.10.222 "zstd -d | qmrestore --storage local-lvm - 202"


Code:
INFO: 100% (10.0 GiB of 10.0 GiB) in 24s, read: 1.1 GiB/s, write: 529.0 MiB/s
INFO: backup is sparse: 2.75 GiB (27%) total zero data
INFO: transferred 10.00 GiB in 24 seconds (426.7 MiB/s)
INFO: Finished Backup of VM 102 (00:00:25)
INFO: Backup finished at 2025-08-19 15:09:38
INFO: Backup job finished successfully



However, this always syncs the whole VM. With that small VM above it's not an issue, but e.g. a 3TB vm will take very long and also wear down the SSD on the standby server if that would be done every night. Is there a way to sync only the differences between the current state and last sync somehow? I.e. take a snapshot and sync only the snapshot maybe?
 
Haven't tried it and it's rather old, so not sure if it'll work with lvm in it's current state, but this looks like it could do the job. When I have more time I might give this a try.

https://github.com/mpalmer/lvmsync


Edit:
Did not realize there is already a thread about this on here:

As well as a bugzilla entry:
https://bugzilla.proxmox.com/show_bug.cgi?id=2398

Which gives two other alternatives, one also rather old:
https://github.com/davidbartonau/lvm-thin-sendrcv

And the other one still maintained this year and from the LINBIT guys who make DRBD:
https://github.com/LINBIT/thin-send-recv
 
Last edited: