Open evilham opened 3 years ago
This is exactly what I was looking for, thanks @evilham!
That's great, if you do test the patch, and it works for you, please also provide some feedback; it'd be useful. (I assume that if it doesn't work you'll come back anyway :-p)
Evilham: thanks for this. If you have time, could you do up a 2nd one that expands on the $sendflags concept you used, but is more generic. basically add 2 new command line flags, that let you specify the send or recv flags.
There are cases where you want to be able to set the recv flags to 'do not mount', or, where you want to use the new OpenZFS 2.0 feature where you can override a property like encryption or compression.
@allanjude That'd make sense, the biggest issue I have is... Picking the flag letters >,<...
Since oOrRsS
are all being used, the next thing that came to mind is zZ
. but then that'd raise the question of which one is send and which one receive.
Suggestions?
Added a preliminary implementation of -z
for send flags and -Z
for receive flags.
Haven't tested it yet, but the changes are mostly straightforward.
Notably manpage and USAGE texts still have to be updated, it'd be great if someone could help with that <3.
Raw sends are incompatible with multiple features of zxfer like backing up properties or sending encrypted datasets to older OpenZFS versions. Nevertheless zxfer is still very useful in these cases due to the snapshot handling logic, the newly added -w flag specifies that zfs send should perform raw sends. No checks are performed on either side as to whether or not they support these flags, zfs (send|receive), and therefore zxfer will fail when it's not the case.
This patch has been tested, not to affect other workflows negatively and it works for the intended use-case. Sadly I currently lack the time to polish it some more and check more potentially incompatible flags.
This might also be considered to close #23.