ZFS VM replication

tjk

Active Member
May 3, 2021
114
14
38
Hello,

Is it possible to keep X number replicas when I am replicating a VM from node 1 to node 2? The setup/scheduler lets me pick frequency but doesn't let me pick number of replicas to keep.

For example, I'd like to accomplish the following:

Replicate VM100 from NodeA to NodeB every hour, and keep 24 hours worth of copies on NodeB so if we have to revert to an earlier version of the VM we can do that.
 
Last edited:
Every guest can be replicated to multiple target nodes, but a guest cannot get replicated twice to the same target node.
 
@tjk this is not possible in Proxmox storage replication. However, an alternative is to use PVE zsync. This can achieve what you want, HOWEVER, this does not support mirgation in a cluster. This means, that if you use zsync, it will copy your data and keep x-number snapshots. When you try to migrate your vm/lxc to your other node where you specified zsync to it does not use that volume created there. Instead it creates another disk. So for example your vm in node1 has disk-0 and replicated it to node2 using zsync it creates that disk also named disk-0. Now when you migrate that vm, it does not know about the zsync replication as it uses the traditional storage replication so what happens is it creates another disk name disk-1 in node2.

Read here
 
Last edited:
  • Like
Reactions: tjk and Kingneutron