Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zfs send -w] Support sending encrypted datasets #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

evilham
Copy link

@evilham evilham commented May 2, 2021

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.

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.
@fabienpelletier
Copy link

This is exactly what I was looking for, thanks @evilham!

@evilham
Copy link
Author

evilham commented May 22, 2021

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)

zxfer Outdated Show resolved Hide resolved
@allanjude
Copy link
Owner

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.

@evilham
Copy link
Author

evilham commented May 23, 2021

@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?

As requested by @allanjude, this allows arbitrary flags to be specified for zfs
send and receive.
@evilham
Copy link
Author

evilham commented May 23, 2021

Added a preliminary implementation of -z for send flags and -Zfor 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement zfs send -e
3 participants