Closed jimklimov closed 4 years ago
Note: so far the idea was coded only, not tested IRL :)
In particular, not sure initially if this snapshot name that does not match the patterns configured in the backup plan would actually get picked up for sending, more so if/after #455 is merged to jump over some snaps and do fewer incremental operations.
The extended test was not in vain - our t/zfs
mock in fact does not get
properties for all datasets as was expected of it.
And we have green results with not ok
tests in the middle :\
tere is a conflict it seems
Split out the commits for arg-less runonce
into another PR (#458) leaving only the work on forced snapname in this branch.
Marking as "WIP" to figure out the test fails...
Back to drawing board after some local tests. Seems this needs two filters, for sends and for cleanups (to not kill manually made snapname). And with manually specified snapnames, maybe needs a pattern variable option too...
Houston, we have a... subject for discussion.
As I experimented with this code in a practical system, I got it to work for passing both just-created "forced" snapshot names as well as automatically generated ones, but only if the "last common" snapshot on dest and src exists and is newer than anything not included by the timestamp filter. Otherwise, zfs recv
suggests that offending snapshots on destination should be destroyed first and so denies the replication.
I see a few ways out of this:
skipIntermediates
feature, to make sure "forced-named" snaps are replicated, whether initially or on a re-run (if initial forced-replication broke before completion, so at least one of the latest two or so snapshots is not a timestamp-based pattern);can you state the usecase for this feature, then it might be easier to figure the right way of implementing it ... my first impression is that we should avoid trying to make znapzend behavior more complex to understand than it already is.
afaik the latest date-time stapshot will never get cleaned
Sorry for falling out of the loop a bit. I think original post still holds here:
if sysadmins intend to make a specially-named snapshot for their unscheduled backup, let znapzend help them do it more easily.
Somewhat a follow-up on discussion from #455 - if sysadmins intend to make a specially-named snapshot for their unscheduled backup, let
znapzend
help them do it more easily.CC @lotheac and @oetiker