Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-43579

Backup with include/exclude flags and Overlapping filters are not validated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 6.5.0, 6.0.0, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 6.0.1, 6.0.2, 5.5.4, 6.0.3, 5.5.5, 5.5.6, 6.0.4, 6.5.1, 6.6.0, 6.6.1
    • 7.0.0
    • tools
    • Untriaged
    • Centos 64-bit
    • 1
    • Unknown

    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.

      Attachments

        For Gerrit Dashboard: MB-43579
        # Subject Branch Project Status CR V

        Activity

          Build couchbase-server-7.0.0-4256 contains backup commit c1aeb3a with commit message:
          MB-43579 Return an error for invalid include/exclude strings

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-4256 contains backup commit c1aeb3a with commit message: MB-43579 Return an error for invalid include/exclude strings

          Verified fix on 7.0.0-4342 - Backup repo creation fails with informative error message: "bucket/scope/collection <name> or parent is already included/excluded"

          will.broadbelt Will Broadbelt added a comment - Verified fix on 7.0.0-4342 - Backup repo creation fails with informative error message: "bucket/scope/collection <name> or parent is already included/excluded"
          hemant.rajput Hemant Rajput added a comment - - edited

          Will Broadbelt, will this be fixed for REST call as well?

           

          hemant.rajput Hemant Rajput added a comment - - edited Will Broadbelt , will this be fixed for REST call as well?  

          Failing for Backup with REST call

          hemant.rajput Hemant Rajput added a comment - Failing for Backup with REST call
          owend Daniel Owen added a comment -

          Hi Hemant Rajput,

          Just wanted to confirm - is it failing with the Backup Service REST API?
          This MB regards using the cbbackupmgr tool - and therefore please could you close and open a new MB regarding the REST API.
          Could you include the curl command you are using and the response you are getting?

          many thanks

          owend Daniel Owen added a comment - Hi Hemant Rajput , Just wanted to confirm - is it failing with the Backup Service REST API? This MB regards using the cbbackupmgr tool - and therefore please could you close and open a new MB regarding the REST API. Could you include the curl command you are using and the response you are getting? many thanks

          Closing this ticket. Will log a new ticket for REST call with info.

          hemant.rajput Hemant Rajput added a comment - Closing this ticket. Will log a new ticket for REST call with info.
          hemant.rajput Hemant Rajput added a comment - Daniel Owen  and Will Broadbelt https://issues.couchbase.com/browse/MB-44584  is logged for REST API issue.

          People

            hemant.rajput Hemant Rajput
            bhargava.yadavalli Bhargava Yadavalli (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty