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

cbbackupmgr did not pickup CB_ARCHIVE_PATH env

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: User Error
    • 5.5.0
    • 5.5.0
    • tools
    • centos 7.4 64-bit
    • Untriaged
    • Centos 64-bit
    • No

    Description

      Install Couchbase Server 5.5.0-2290 on 4 centos 7.4 servers.
      Run cbbackupmgr collect-logs with CB_ARCHIVE_PATH set to /tmp/env/logs
      cbbackupmgr collect-logs failed to write logs to /tmp/envlogs

      [root@s44018 ~]# rm -rf /tmp/envlogs/*
      [root@s44018 ~]# CB_ARCHIVE_PATH=/tmp/envlogs;  /opt/couchbase/bin//cbbackupmgr  collect-logs -a /tmp/entbackup 
      Collecting logs succeeded, logs are located in `/tmp/entbackup/logs`
      [root@s44018 ~]# ls /tmp/envlogs/
      [root@s44018 ~]# unset CB_ARCHIVE_PATH; export CB_ARCHIVE_PATH=/tmp/envlogs;  /opt/couchbase/bin//cbbackupmgr  collect-logs -a /tmp/entbackup 
      Collecting logs succeeded, logs are located in `/tmp/entbackup/logs`
      [root@s44018 ~]# ls /tmp/envlogs/
      [root@s44018 ~]# 
      

      Attachments

        Issue Links

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

          Activity

            pvarley Patrick Varley added a comment - - edited

            Is this not the same test as in MB-27646?

            As I mentioned in MB-27646 the test is not valid, let me work through it line by line:

            • [root@s44018 ~]# CB_ARCHIVE_PATH=/tmp/envlogs;  /opt/couchbase/bin//cbbackupmgr  collect-logs -a /tmp/entbackup 
              

              As both -a and the CB_ARCHIVE_PATH environment variable is set, cbbackupmgr takes -a to be the priority.

            • [root@s44018 ~]# ls /tmp/envlogs/
              

              The folder is empty as it is never used because -a was set to /tmp/entbackup which is used.

            • [root@s44018 ~]# unset CB_ARCHIVE_PATH; export CB_ARCHIVE_PATH=/tmp/envlogs;  /opt/couchbase/bin//cbbackupmgr  collect-logs -a /tmp/entbackup 
              Collecting logs succeeded, logs are located in `/tmp/entbackup/logs`
              

              Again both -a and the CB_ARCHIVE_PATH environment variable are set, cbbackupmgr takes -a to be the priority and uses /tmp/entbackup. The output goes on to explain which folder is being used.

            The test needs to be changed to not use -a.

            This behaviour is documented:

            CB_ARCHIVE_PATH::
            Specifies the path to the backup archive. If the archive path is supplied as
            a command line argument then this value is overridden.

            pvarley Patrick Varley added a comment - - edited Is this not the same test as in MB-27646 ? As I mentioned in MB-27646 the test is not valid, let me work through it line by line: [root@s44018 ~]# CB_ARCHIVE_PATH=/tmp/envlogs; /opt/couchbase/bin//cbbackupmgr collect-logs -a /tmp/entbackup As both -a and the CB_ARCHIVE_PATH environment variable is set, cbbackupmgr takes -a to be the priority. [root@s44018 ~]# ls /tmp/envlogs/ The folder is empty as it is never used because -a was set to /tmp/entbackup which is used. [root@s44018 ~]# unset CB_ARCHIVE_PATH; export CB_ARCHIVE_PATH=/tmp/envlogs; /opt/couchbase/bin//cbbackupmgr collect-logs -a /tmp/entbackup Collecting logs succeeded, logs are located in `/tmp/entbackup/logs` Again both -a and the CB_ARCHIVE_PATH environment variable are set, cbbackupmgr takes -a to be the priority and uses /tmp/entbackup . The output goes on to explain which folder is being used. The test needs to be changed to not use -a . This behaviour is documented: CB_ARCHIVE_PATH:: Specifies the path to the backup archive. If the archive path is supplied as a command line argument then this value is overridden.

            People

              thuan Thuan Nguyen
              thuan Thuan Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty