diff options
author | Sean Eric Fagan <[email protected]> | 2022-03-18 17:02:12 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-18 17:02:12 -0700 |
commit | 565089f592426f4a8f0e3df1027f947700799fa6 (patch) | |
tree | b1b4223cf80d5cb2a0ce84fd8560e39d2a656a47 /man | |
parent | 3ce3d305324ba5ffddfcbc90a996a2b3a8424109 (diff) |
Allow zfs send to exclude datasets
Add support for a -exclude/-X option to `zfs send` to allow dataset
hierarchies to be excluded.
Snapshots can be excluded using a channel program; however,
this can result in failures with 'zfs send -R'; this option allows
them to be excluded. Fortunately, this required a change only to
cmd/zfs/zfs_main.c, using the already-existing callback argument
to zfs_send() that is currently unused.
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Christian Schwarz <[email protected]>
Reviewed-by: Ahelenia ZiemiaĆska <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Co-authored-by: Sean Eric Fagan <[email protected]>
Signed-off-by: Sean Eric Fagan <[email protected]>
Closes #13158
Diffstat (limited to 'man')
-rw-r--r-- | man/man8/zfs-send.8 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/man/man8/zfs-send.8 b/man/man8/zfs-send.8 index e83a92e4b..397db5063 100644 --- a/man/man8/zfs-send.8 +++ b/man/man8/zfs-send.8 @@ -40,6 +40,7 @@ .Nm zfs .Cm send .Op Fl DLPRbcehnpsvw +.Op Fl X Ar dataset Ns Oo , Ns Ar dataset Oc Ns ... .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot .Ar snapshot .Nm zfs @@ -73,6 +74,7 @@ .Nm zfs .Cm send .Op Fl DLPRbcehnpvw +.Op Fl X Ar dataset Ns Oo , Ns Ar dataset Oc Ns ... .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot .Ar snapshot .Xc @@ -140,6 +142,23 @@ If the flag is used to send encrypted datasets, then .Fl w must also be specified. +.It Fl X , -exclude Ar dataset Ns Oo , Ns Ar dataset Oc Ns ... +When the +.Fl R +flag is given, +.Fl X +can be used to specify a list of datasets to be excluded from the +data stream. +The +.Fl X +option can be used multiple times, or the list of datasets can be +specified as a comma-separated list, or both. +.Ar dataset +must not be the pool's root dataset, and all descendant datasets of +.Ar dataset +will be excluded from the send stream. +Requires +.Fl R . .It Fl e , -embed Generate a more compact stream by using .Sy WRITE_EMBEDDED |