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-recv.8 fixes, libzfs-sendrecv followup #13101

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/libzfs/libzfs_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5023,11 +5023,10 @@ static boolean_t
zfs_receive_checkprops(libzfs_handle_t *hdl, nvlist_t *props,
const char *errbuf)
{
nvpair_t *nvp;
nvpair_t *nvp = NULL;
zfs_prop_t prop;
const char *name;

nvp = NULL;
while ((nvp = nvlist_next_nvpair(props, nvp)) != NULL) {
name = nvpair_name(nvp);
prop = zfs_name_to_prop(name);
Expand Down Expand Up @@ -5086,7 +5085,7 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap,

/* check cmdline props, raise an error if they cannot be received */
if (!zfs_receive_checkprops(hdl, cmdprops, errbuf))
return (-1);
return (zfs_error(hdl, EZFS_BADPROP, errbuf));

if (flags->isprefix &&
!zfs_dataset_exists(hdl, tosnap, ZFS_TYPE_DATASET)) {
Expand Down
4 changes: 2 additions & 2 deletions man/man8/zfs-receive.8
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ received as an encryption root, specify encryption properties in the same
manner as is required for
.Nm zfs Cm create .
For instance:
.Dl # Nm zfs Cm send Pa tank/test@snap1 | Nm zfs Cm recv Fl o Sy encryption Ns = Ns Sy on Fl o Sy keyformat=passphrase Fl o Sy keylocation Ns = Ns Pa file:///path/to/keyfile
.Dl # Nm zfs Cm send Pa tank/test@snap1 | Nm zfs Cm recv Fl o Sy encryption Ns = Ns Sy on Fl o Sy keyformat Ns = Ns Sy passphrase Fl o Sy keylocation Ns = Ns Pa file:///path/to/keyfile
.Pp
Note that
.Fl o Sy keylocation Ns = Ns Sy prompt
Expand All @@ -329,7 +329,7 @@ Once the receive has completed, you can use
.Nm zfs Cm set
to change this setting after the fact.
Similarly, you can receive a dataset as an encrypted child by specifying
.Op Fl x Ar encryption
.Fl x Sy encryption
to force the property to be inherited.
Overriding encryption properties (except for
.Sy keylocation )
Expand Down