Collects debugging information from a backup archive
cbbackupmgr collect-logs [--archive <archive_dir>] [--output-dir <dir>] [--redact] [--salt <salt>] [--upload-host <url>] [--customer <customer-name>] [--upload-proxy <proxy>] [--ticket <ticket-number>] [--obj-access-key-id <access_key_id>] [--obj-cacert <cert_path>] [--obj-endpoint <endpoint>] [--obj-no-ssl-verify] [--obj-region <region>] [--obj-staging-dir <staging_dir>] [--obj-secret-access-key <secret_access_key>] [--s3-force-path-style]
Collects debugging information to make it easier to debug user issues. This command collects the logs, the output of the info command, the range.json files from each backup, the seqnos and failover logs from each backup, and the backup_meta.json files from each repo. This data is put into a zip file that contains the date that the collect-info command was run. This command will only collect meta from the backup archive.
Below are a list of parameters for the compact command.
- -a,--archive <archive_dir>
The location of the archive directory.
- -o,--output-dir <dir>
Specifies a path where the zip file that this command writes should be written. If this flag is not used then the zip file is written to the logs directory of the archive the command is run against.
When the redact flag is specified a redacted copy of the logs will be produced, in the same directory as the unredacted version. The redacted zip directory will be prefixed by `redacted-`.
- --salt <salt>
Specifies the salt to used to hash the data. If possible the salt should be the same used by Couchbase Server to allow the logs to be easily cross referenced. The Couchbase Server salt is at the top of the couchbase.log in the zip file generated by cbcollect_info. If no salt is specified it will be auto-generated.
- --upload-host <url>
Specifies the fully-qualified domain name of the host you want the logs uploaded to. The protocol prefix of the domain name, https://, is optional. It is the default-only supported protocol.
- --customer <customer-name>
Specifies the customer name. This value must be a string whose maximum length is 50 characters. Only the following characters can be used: [A-Za-z0-9_.-]. If any other characters are included, the request is rejected.
- --upload-proxy <upload-proxy>
Specifies a proxy for upload.
- --ticket <ticket-number>
Specifies the Couchbase Support ticket-number. The value must be a string with a maximum length of 7 characters, containing only digits in the range of 0-9.
Native cloud integration is an Enterprise Edition feature which was introduced in Couchbase Server 6.6.0.
- --obj-staging-dir <staging_dir>
When performing an operation on an archive which is located in the cloud such as AWS, the staging directory is used to store local meta data files. This directory can be temporary (it’s not treated as a persistent store) and is only used during the backup. NOTE: Do not use
Disk requirementsin cbbackupmgr-cloud for more information.
- --obj-access-key-id <access_key_id>
The access key id which has access to your chosen object store. This option can be omitted when using the shared config functionality provided by your chosen object store. Can alternatively be provided using the
- --obj-cacert <cert_path>
Specifies a CA certificate that will be used to verify the identity of the object store being connected to.
- --obj-endpoint <endpoint>
The host/address of your object store.
Skips the SSL verification phase when connecting to the object store. Specifying this flag will allow a connection using SSL encryption, but you are vulnerable to a man-in-the-middle attack.
- --obj-region <region>
The region in which your bucket/container resides. For AWS this option may be omitted when using the shared config functionality. See the AWS section of the cloud documentation for more information.
- --obj-secret-access-key <secret_access_key>
The secret access key which has access to you chosen object store. This option can be omitted when using the shared config functionality provided by your chosen object store. Can alternatively be provided using the
- --obj-log-level <level>
Set the log level for the cloud providers SDK. By default logging will be disabled. Valid options are cloud provider specific and are listed below.
The valid options for the AWS SDK are
The valid options for the Azure SDK are
By default authenticating using instance metadata is disabled, supplying this flag will allow the fetching credentials/auth tokens from (VM) internal instance metadata endpoints.
To generate debugging information for an archive dir "/data/backup" and output the file to "/data/output/logs" run the following command.
$ cbbackupmgr collect-logs -a /data/backup
To generate debugging information for an archive dir "/data/backup" and output the file to "/tmp" run the following command.
$ cbbackupmgr collect-logs -a /data/backup -o /tmp
To upload the logs directly to support use:
$ cbbackupmgr collect-logs -a /data/backup -o /tmp \ --upload-host uploads.couchbase.com \ --customer CUSTOMER_NAME --ticket 378211
Specifies the path to the backup archive. If the archive path is supplied as a command line argument then this value is overridden.
Specifies the path to the staging directory. If the
--obj-staging-dirargument is provided in the command line then this value is overridden.
Specifies the object store region. If the
--obj-regionargument is provided in the command line then this value is overridden.
Specifies the object store access key id. If the
--obj-access-key-idargument is provided in the command line this value is overridden.
Specifies the object store secret access key. If the
--obj-secret-access-keyargument is provided in the command line this value is overridden.
By default cbbackupmgr will disable fetching EC2 instance metadata. Setting this environment variable to true will allow the AWS SDK to fetch metadata from the EC2 instance endpoint.
Part of the cbbackupmgr suite