Add pools ignore in exclude option
What if pool and dataset names overlap? I suspect this probably needs to be a separate flag, but could be convinced otherwise.
Separate via regexp in docs used ^rpool
What if I want to exclude the dataset rpool, but not the pool rpool?
--exclude='^(.+)/rpool/(.+)$' or /rpool, first '/' imposible in pool name
The top-level dataset name and the pool name cannot be differentiated - there are no slashes, and dataset names are never preceeded by a slash:
$ zfs list -o name rpool
NAME
rpool
$ zpool list -o name rpool
NAME
rpool
aha, not bug is feature)). But for always valid result need more what 12 string changes, default dataset name in pool with not default name unlikely, maybe replace if c.excludes.MatchString(p) { to if c.excludes.MatchString("pool:" + p) { and use --exclude=pool:rpool, but i not sure is good idea
maybe replace
if c.excludes.MatchString(p) {toif c.excludes.MatchString("pool:" + p) {and use --exclude=pool:rpool, but i not sure is good idea
I guess you could do it this way, but simpler and more discoverable to just add a separate flag.