My scenario is two servers in a hot-standby setup using ZFS to host VMs and using ZFS incremental snapshots for replication of changes to the VMs from one server to the other using something like zrep on a regular basis. Not sure what that basis is currently, might be something slow like every some minutes.
I would like to know what the incremental difference between two snapshots actually is: ZFS is copy-on-write in a way that overwriting exactly the same data in a file always leads to the new data being copied into free storage and linked into the changed file. From my understanding, if that happens multiple times between two snapshots, the difference between those two snapshots actually is only the most recent change to the same data. So in a file with 50 GB of data, if 3 times the exact same 20 GB of data gets written, the amount of difference from snapshots before and after those 3 changes is exactly the most recent 20 GB of data written only. The former 2 writes of 20 GB are simply lost and that's OK of course, because else I would have needed to create additional snapshots.
So while actually 60 GB of changes were written to the discs over time, the difference between the both snapshots is only 20 GB and only those are transferred using
receive of snapshots over the network.
Is that correct or am I wrong?