oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
607 stars 137 forks source link

Modernize #384 : More flexible handling of offline destinations #506

Closed jimklimov closed 3 years ago

jimklimov commented 3 years ago

This picks up commits proposed in #384 and applies them to current master branch and its logical/conceptual changes.

The code passed locally a ./test.sh run and from the looks of it - should be reasonably safe for common use-cases, but there may be caveats for non-default runs with --inherited mode which I suspect can end up ignoring this protection at the moment (detailed in my comments to the original PR).

Note that by default this code still should bail on cleaning up sources that it could not replicate to a destination, but it will track which sources were replicated successfully, and with the --cleanOffline argument it should clean up source snapshots that were not replicated but are not the latest known common snapshot.

oetiker commented 3 years ago

cool

Harvie commented 7 months ago

I am running znapzend 0.21.1 with "--cleanOffline" and it does not seem to delete the local snapshots as expected when destination is offline.