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

cbbackupmgr env vars inconsistent with -c/--cluster args

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 6.0.0
    • 6.5.0
    • tools
    • None
    • Untriaged
    • Release Note
    • Unknown

    Description

      CB_CLUSTER env var doesn't handle couchbase:// prefix of no prefix at all, unlike --cluster arg. e.g.

      # BROKEN
      export CB_CLUSTER=couchbase://hostname.com
      /opt/couchbase/bin/cbbackupmgr backup  --username admin --archive /tmp/foo --password XXXXXX
      Error backing up cluster: unsupported protocol scheme "couchbase"
       
      # WORKING
      /opt/couchbase/bin/cbbackupmgr backup --archive /tmp/foo --cluster couchbase://hostname.com --username admin --password XXXXXX 
      Backed up to 2019-02-26T11_59_16.902826961Z
      Copied all data in 11.223006319s (Avg. 10.12KB/Sec)
      4 buckets, 6 items / 113.57KB
      Backup successfully completed
      

      Attachments

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

        Activity

          Reopen because I forgot to add the case where no scheme prefix is provided

          carlos.gonzalez Carlos Gonzalez Betancort (Inactive) added a comment - Reopen because I forgot to add the case where no scheme prefix is provided

          Build couchbase-server-6.5.0-2510 contains backup commit 0d074be with commit message:
          MB-33207 Env var allow couchbase:// scheme

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-2510 contains backup commit 0d074be with commit message: MB-33207 Env var allow couchbase:// scheme

          Build couchbase-server-6.5.0-2511 contains backup commit eab2da2 with commit message:
          Revert "MB-33207 Env var allow couchbase:// scheme"

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-2511 contains backup commit eab2da2 with commit message: Revert " MB-33207 Env var allow couchbase:// scheme"

          Build couchbase-server-6.5.0-2511 contains cbflag commit 205e634 with commit message:
          MB-33207 Validate environmental variables

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-2511 contains cbflag commit 205e634 with commit message: MB-33207 Validate environmental variables

          Should this also be included in the next releases 6.0.x / 5.5.x.  If so it would prevent noisy support calls.

          rohinton.kazak Rohinton Kazak (Inactive) added a comment - Should this also be included in the next releases 6.0.x / 5.5.x.  If so it would prevent noisy support calls.

          Validated this on 6.5.0-3391.

          [root@node1-cb600-centos7 ~]# cat /opt/couchbase/VERSION.txt 
          6.5.0-3391
          [root@node1-cb600-centos7 ~]# /opt/couchbase/bin/cbbackupmgr config -a /tmp/backup/  -r example1
          Backup repository `example1` created successfully in archive `/tmp/backup/`
          [root@node1-cb600-centos7 ~]# export CB_CLUSTER=couchbase://10.112.190.101 
          [root@node1-cb600-centos7 ~]#  /opt/couchbase/bin/cbbackupmgr backup -a /tmp/backup/ -r example1 -u Administrator -p password --resume
           
          Backing up to 2019-06-04T02_35_01.776878482-07_00
          Copied all data in 40.08s (Avg. 547.19KB/Sec)                                                                                                                                                                            31591 items / 21.37MB
          travel-sample           [=========================================================================================================================================================================================================== ] 100.00%
           
          Backup successfully completed
          Backed up bucket "travel-sample" succeeded
          Mutations backedup; 31591, Mutations failed to backup: 0
          Deletions backedup: 0, Deletions failed to backup: 0
          [root@node1-cb600-centos7 ~]# 
          

          Balakumaran.Gopal Balakumaran Gopal added a comment - Validated this on 6.5.0-3391. [root@node1-cb600-centos7 ~]# cat /opt/couchbase/VERSION.txt 6.5.0-3391 [root@node1-cb600-centos7 ~]# /opt/couchbase/bin/cbbackupmgr config -a /tmp/backup/ -r example1 Backup repository `example1` created successfully in archive `/tmp/backup/` [root@node1-cb600-centos7 ~]# export CB_CLUSTER=couchbase://10.112.190.101 [root@node1-cb600-centos7 ~]# /opt/couchbase/bin/cbbackupmgr backup -a /tmp/backup/ -r example1 -u Administrator -p password --resume   Backing up to 2019-06-04T02_35_01.776878482-07_00 Copied all data in 40.08s (Avg. 547.19KB/Sec) 31591 items / 21.37MB travel-sample [=========================================================================================================================================================================================================== ] 100.00%   Backup successfully completed Backed up bucket "travel-sample" succeeded Mutations backedup; 31591, Mutations failed to backup: 0 Deletions backedup: 0, Deletions failed to backup: 0 [root@node1-cb600-centos7 ~]#
          owend Daniel Owen added a comment -

          Hi Amarantha Kulkarni,

          Suggested release note:

          Fixed an issue where the CB_CLUSTER env var doesn't handle couchbase:// prefix or no prefix. The fix ensures it behaves the same as using the --cluster argument with the cbbackupmgr tool.

          owend Daniel Owen added a comment - Hi Amarantha Kulkarni , Suggested release note: Fixed an issue where the CB_CLUSTER env var doesn't handle couchbase:// prefix or no prefix. The fix ensures it behaves the same as using the --cluster argument with the cbbackupmgr tool.

          People

            carlos.gonzalez Carlos Gonzalez Betancort (Inactive)
            dhaikney David Haikney
            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