mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add --no-preserve-encryption flag
* Add an option to send datasets with params or replicate without preserving encryption * Add a test case for the new functionality Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Chris Jacobs <idefix2020dev@gmail.com> Closes #18240
This commit is contained in:
+7
-3
@@ -344,10 +344,10 @@ get_usage(zfs_help_t idx)
|
||||
case HELP_ROLLBACK:
|
||||
return (gettext("\trollback [-rRf] <snapshot>\n"));
|
||||
case HELP_SEND:
|
||||
return (gettext("\tsend [-DLPbcehnpsVvw] "
|
||||
return (gettext("\tsend [-DLPbcehnpsUVvw] "
|
||||
"[-i|-I snapshot]\n"
|
||||
"\t [-R [-X dataset[,dataset]...]] <snapshot>\n"
|
||||
"\tsend [-DnVvPLecw] [-i snapshot|bookmark] "
|
||||
"\tsend [-DnVvPLecwU] [-i snapshot|bookmark] "
|
||||
"<filesystem|volume|snapshot>\n"
|
||||
"\tsend [-DnPpVvLec] [-i bookmark|snapshot] "
|
||||
"--redact <bookmark> <snapshot>\n"
|
||||
@@ -4753,11 +4753,12 @@ zfs_do_send(int argc, char **argv)
|
||||
{"holds", no_argument, NULL, 'h'},
|
||||
{"saved", no_argument, NULL, 'S'},
|
||||
{"exclude", required_argument, NULL, 'X'},
|
||||
{"no-preserve-encryption", no_argument, NULL, 'U'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt_long(argc, argv, ":i:I:RsDpVvnPLeht:cwbd:SX:",
|
||||
while ((c = getopt_long(argc, argv, ":i:I:RsDpVvnPLeht:cwbd:SX:U",
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'X':
|
||||
@@ -4843,6 +4844,9 @@ zfs_do_send(int argc, char **argv)
|
||||
case 'S':
|
||||
flags.saved = B_TRUE;
|
||||
break;
|
||||
case 'U':
|
||||
flags.no_preserve_encryption = B_TRUE;
|
||||
break;
|
||||
case ':':
|
||||
/*
|
||||
* If a parameter was not passed, optopt contains the
|
||||
|
||||
Reference in New Issue
Block a user