-
System information
Describe the problem you're observingWhen synchronizing two machines with ZFS snapshots, (A and B), if an accident or outage causes A to wind up without a common snapshot ancestor with B, then there is no way short of juggling filesystems to recover the incremental send behavior nicely. What I would like to be able to do is Basically with two filesystems looking like:
The command
would result in:
Based on my understanding of how snapshots are implemented under the hood for ZFS, this would functionally have to be implemented as though there was a totally empty snapshot which then received a bunch of blocks. But, it would mean that a single filesystem chain can be maintained, which vastly simplifies the use-case of serving fixed content (backup snapshots) out of the system. As things currently stand, if you wind up in this situation the only recovery mechanism is to delete all the snapshots on the destination filesystem (which you may not want to do if they represent part of an offsite rollback or backup strategy that have since been cleared from the apool side) or juggle filesystems (which leaves you with separate filesystem trees). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This should be possible today:
So in your example, you can do |
Beta Was this translation helpful? Give feedback.
-
Trying this out with, this doesn't appear to work: So the situation on my workstation...
Based on the man pages this is the command I would have expected to work (which prompts the original question - it feels like it implies that I should just be able to "receive to snapshot")
Taking that error message, I then get this:
Taking that error message I then get this:
Basically as far as I can tell, this is not currently possible. The use of the |
Beta Was this translation helpful? Give feedback.
-
I'm not sure about the later 2 errors, but I understand the first one:
According to the output you provided from |
Beta Was this translation helpful? Give feedback.
This should be possible today:
So in your example, you can do
zfs send apool@snapshot3 | zfs receive -o origin=bpol@snapshot0 bpool/recvd
. Ideally you'd thenzfs 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…