]> git.proxmox.com Git - mirror_zfs.git/commit
Allow zfs send to exclude datasets
authorSean Eric Fagan <kithrup@users.noreply.github.com>
Sat, 19 Mar 2022 00:02:12 +0000 (17:02 -0700)
committerGitHub <noreply@github.com>
Sat, 19 Mar 2022 00:02:12 +0000 (17:02 -0700)
commit565089f592426f4a8f0e3df1027f947700799fa6
treeb1b4223cf80d5cb2a0ce84fd8560e39d2a656a47
parent3ce3d305324ba5ffddfcbc90a996a2b3a8424109
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 <pcd@delphix.com>
Reviewed-by: Christian Schwarz <christian.schwarz@nutanix.com>
Reviewed-by: Ahelenia ZiemiaƄska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sean Eric Fagan <kithrup@mac.com>
Signed-off-by: Sean Eric Fagan <kithrup@mac.com>
Closes #13158
cmd/zfs/zfs_main.c
man/man8/zfs-send.8
tests/runfiles/common.run
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/rsend_025_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/rsend_026_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/rsend_027_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/rsend_028_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/rsend_029_neg.ksh [new file with mode: 0755]