Closed manfromafar closed 2 hours ago
I don't believe it can't be done. When sender has snapshot 2 between 1 and 3, it means there was specific transaction group in between TXGs of 1 and 3 that represented the state. Once you replicating 3 on top of 1, it might get all received in one TXG and there may be no TXG in between. And even if not, blocks written as part of 2 on sender will not have a coherent birth time on receiver to properly recreate the 2. On top of that, it is impossible to write blocks from 2 with birth time before the birth time of blocks from 3, since they were not existing at that time according to receiver pool.
Describe the feature would like to see added to OpenZFS
Since I was messing around with snapshots and send with https://github.com/openzfs/zfs/issues/16767 It got me thinking of we could have the ability to "backfill" snapshots from one dataset to another without the need to delete the newer snapshots and resend them.
A easy example of this would be if you do daily snapshots from sys1 to backup1. Say for some reason the daily replication of sys1 to backup1 fails and your chain now looks like this:
sys1: backup1: snap1 snap1 snap2 snap3 snap3 snap4 snap4 snap5 snap5
It would be nice to be able to send a increment of snapshots for either 1-2 or 1-3 or 2-3 to add in the missing snapshot snap2 without having to resend snapshots 2,3,4,5. Since depending on how much data there is this could take a while.
How will this feature improve OpenZFS?
This would allow for faster replication of missing snapshots/data from one system to another or even locally.
Failed backups, user error when sending snapshots
Additional context