ZFS incremental snapshot send/recv without first snapshot

snapshotzfs

I have the following ZFS dataset:

pool/dataset
pool/dataset@snap1
pool/dataset@snap2
pool/dataset@snap3

Which has been replicated to a backup pool, using ZFS send/recv

backupPool/dataset
backupPool/dataset@snap1
backupPool/dataset@snap2

Afterwards, I deleted dataset@snap1 and dataset@snap2 from pool, and I am in a situation where I cannot send dataset@snap3 incrementally to backupPool.

Is there a way of solving this situation? For instance, generate a ZFS incremental snapshot between pool/dataset@snap3 and backupPool/dataset@snap2 and send it to backupPool? Or transfer back backupPool/dataset@snap2 to pool?

I could transfer pool/dataset@snap3 to a new dataset in backupPool, but I really need to keep the "history" of snapshots.

Best Answer

Thank you for all your suggestions!

I finally rsynced pool/dataset@snap3 with backupPool/dataset@snap2, deleted the dataset backupPool/dataset, and recreated it from backupPool/dataset. I was not able to find a better solution to this problem.

The suggestion from Dan was really helpful. Also, to avoid deleting snapshots in the future it is a good practice to hold them.

Related Question