Closed gabviv73 closed 4 years ago
this is not something we actively support in znapzend, but I guess it might work if you just defined two different destinations ... backups would just go to the ones that are available.
I will also say that I do this exact thing right now in SmartOS using restic and borg (I use znapzend for other purposes but not for this so I've never tried using znapzend to do it). I have two USB drives that I actually just named the same pool name as only one is connected at a time and I have a script run every day to back up using restic or borg. I rotate the drives and it works well doing it that way.
this is not something we actively support in znapzend, but I guess it might work if you just defined two different destinations ... backups would just go to the ones that are available.
I tried doing in this way, but SRC snapshots are never cleaned, because DST are never present at the same time So I end up with SRC dataset that contains snapshots that must have been pruned...
true, source cleaning does get suspended when not all destinations are present ... so you would have to 'reconfigure' in step with you switching the DST devices
Maybe using zfs hold/release` if multiple DST are present.
When creating the snapshot:
zfs hold DST_1 SRC_POOL/Dataset@YYYY-mm-dd-hhmmss
zfs hold DST_2 SRC_POOL/Dataset@YYYY-mm-dd-hhmmss
If a hold tag exists, the SRC snapshot cannot be destroyed.
When a successfull transfer to DST occurs, untag the snapshot:
zfs release DST_1 SRC_POOL/Dataset@YYYY-mm-dd-hhmmss
and
zfs release DST_2 SRC_POOL/Dataset@YYYY-mm-dd-hhmmss
So the SRC snapshot can be deleted by policy.
Hello, daily I want to export mi DST pool to removable media, alternating two disk to be taken offsite. Which is the best strategy to define the removable pools ?
If I name the pool on the two removable disk with the same name, if they are not rotated, there is the risk that one become not syncable, because znapzend removes the SRC snapshots.
If i name the pool on the two removable disk with different names, defining two DSTs, in this way SRC pool is never cleaned.
Suggestions ?
Thank you.