Skip to content

Reverse incremental ZFS receive #10325

Answered by ahrens
wrouesnel asked this question in Q&A
Discussion options

You must be logged in to vote

This should be possible today:

man zfs-receive
...
     zfs receive [-FhMnsuv] [-o origin=snapshot] [-o property=value]
         [-x property] filesystem|volume|snapshot
       -o origin=snapshot
           Forces the stream to be received as a clone of the given snapshot.
           If the stream is a full send stream, this will create the filesys‐
           tem described by the stream as a clone of the specified snapshot.

So in your example, you can do zfs send apool@snapshot3 | zfs receive -o origin=bpol@snapshot0 bpool/recvd. Ideally you'd then zfs promote bool/recvd, rename it to replace the original and then destroy the old filesystem. In your example, that might be a bit messy si…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by behlendorf
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10325 on December 22, 2020 00:57.