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

[BAR] when restoring with include bucket.scope all scope udf are restored

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      To repro:

      • create bucket2.scope2a and bucket2.scope2b
      • create functions in scope2as and scope2b
      • perform backup
      • restore with --include-data bucket2.scope2a

      Resore is successful:

      # ./cbbackupmgr restore -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password --include-data bucket2.scope2a
      Restoring backup '2021-08-03T06_02_04.76482713-07_00'
      Copied all data in 955ms (Avg. 28.00KiB/Sec)                                                                                              0 items / 28.00KiB
      [==================================================================================================================================================] 100.00%
       
       
      | Transfer
      | --------
      | Status    | Avg Transfer Rate | Started At                        | Finished At                     | Duration |
      | Succeeded | 28.00KiB          | Wed, 04 Aug 2021 04:47:57 -0700/s | Wed, 04 Aug 2021 04:47:58 -0700 | 1.012s   |
       
       
      | Bucket
      | ------
      | Name    | Status    | Transferred | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
      | bucket2 | Succeeded | 28.00KiB    | 28.00KiB/s        | Wed, 04 Aug 2021 04:47:58 -0700 | Wed, 04 Aug 2021 04:47:58 -0700 | 58ms     |
      |
      | Mutations                    | Deletions                    | Expirations                  |
      | ---------                    | ---------                    | -----------                  |
      | Received | Errored | Skipped | Received | Errored | Skipped | Received | Errored | Skipped |
      | 0        | 0       | 0       | 0        | 0       | 0       | 0        | 0       | 0       |
       
       
      Restore completed successfully 

      but I see UDFs from scope2a and scope2b:

      cbq> select f.identity.name, f.identity.`bucket`, f.identity.`scope` from system:functions as f order by name
         > ;
      {
          "requestID": "1a2cd2ff-42bd-4743-abf3-8920a49c89d1",
          "signature": {
              "bucket": "json",
              "name": "json",
              "scope": "json"
          },
          "results": [
          {
              "name": "func_global"
          },
          {
              "bucket": "bucket2",
              "name": "scope2a_func",
              "scope": "scope2a"
          },
          {
              "bucket": "bucket2",
              "name": "scope2b_func",
              "scope": "scope2b"
          }
          ], 

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          Build couchbase-server-7.0.1-5990 contains query commit 23b4809 with commit message:
          MB-47741 only accept one of include or exclude

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.1-5990 contains query commit 23b4809 with commit message: MB-47741 only accept one of include or exclude

          Build couchbase-server-7.1.0-1119 contains query commit fa4c0c0 with commit message:
          MB-47741 only accept one of include or exclude

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1119 contains query commit fa4c0c0 with commit message: MB-47741 only accept one of include or exclude

          Verified with 7.0.2-6535 and 7.1.0-1128 with test case: test_restore_include,include=bucket1.scope1

          pierre.regazzoni Pierre Regazzoni added a comment - Verified with 7.0.2-6535 and 7.1.0-1128 with test case: test_restore_include,include=bucket1.scope1

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty