allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
124 stars 40 forks source link

feature: allow excludes #15

Open allanjude opened 9 years ago

allanjude commented 9 years ago

Allow datasets to be excluded

ndruba commented 2 years ago

Hi! Its very useful feature. And seems, that I knows, how to add this. As I think correctly, to have possibility to exclude some datasets from send list, need to add filter to 683 and 693 lines: lzfs_list_hr_s_snap=$($LZFS list -Hr -o name -s creation -t snapshot $initial_source) like this: lzfs_list_hr_s_snap=$($LZFS list -Hr -o name -s creation -t snapshot $initial_source | grep -v -e FIRST_DATASET -e SECOND_DATASET)

During writing this message I was modified script to add exclusion support. Because -E option have this strange construction: option_E="--exclude=$OPTARG $option_E" I'm cutting "--exclude=" by sed after. Details in pull request.