Details
Description
What's the issue?
When attempting to configure an archive using the include/exclude flags where the filters are overlapping the user is not warned/nor is an error thrown.
$ /opt/couchbase/bin/cbbackupmgr config --archive /tmp/backup/ --repo test_backup_repo --disable-ft-indexes --disable-views --disable-data --disable-ft-alias --disable-eventing --disable-analytics --include-data test_bucket_1.test_scope_1,test_bucket_1.test_scope_1.test_collection_1
|
This wasn't a major issue with previous version of 'cbbackupmgr' because including/excluding was only at a bucket level, however, since we now support collection level including/excluding we should be more clear. Note that it was possible to provide overlapping mapping such as '--include-buckets bucket,bucket' prior to 7.0.0.
What's the fix?
We already perform a significant amount of validation for overlapping mappings when using the '--map-data' flag, we should add similar validation for the include/exclude data flags.
Priority
Marked as minor for now since providing an overlapping filter is "valid", in the above example all the collections in 'test_bucket_1.test_scope_1' would be backed up; including 'test_bucket_1.test_scope_1.test_collection_1' i.e. the "parent" filter implicitly takes priority; I believe this is more of a quality of life change.