Commit Graph

4 Commits

Author SHA1 Message Date
Christian Schwarz
975fdee217 replication & pruning: ditch replicated-property, use bookmark as cursor instead
A bookmark with a well-known name is used to track which version was
last successfully received by the receiver.
The createtxg that can be retrieved from the bookmark using `zfs get` is
used to set the Replicated attribute of each snap on the sender:
If the snap's CreateTXG > the cursor's, it is not yet replicated,
otherwise it has been.

There is an optional config option to change the behvior to
`CreateTXG >= the cursor's`, and the implementation defaults to that.

The reason: While things work just fine with `CreateTXG > the cursor's`,
ZFS does not provide size estimates in a `zfs send` dry run
(see acd2418).
However, to enable the use case of keeping the snapshot only around for
the replication, the config flag exists.
2018-09-05 19:51:06 -07:00
Christian Schwarz
be57d6ce8e replication/diff: replace invalid comparison of CreateTXG with Creation 2018-09-04 14:01:48 -07:00
Christian Schwarz
ad28fd1ecb replication: diff does not need special case for receiver/sender == nil 2018-09-02 15:46:42 -07:00
Christian Schwarz
7b3a84e2a3 move replication package to project root (independent of cmd package) 2018-08-22 00:19:03 +02:00