oadp gather info

Gather information related to the backup and restore with OADP process.

This command collects debugging information in a zip file, including:

  • cpd-cli logs
  • cpdbr-tenant-service pod logs
  • All Velero backup and restore logs and describes
  • Data collected by the Red Hat® OADP must-gather tool (output of oc must-gather <oadp-operator> command)
  • Complete namespace collection, including custom resources, of:
    • tenant namespaces (IBM® Software Hub operator, IBM Software Hub instance, and tethered namespaces)
    • OADP namespace
    • OpenShift® Operator Lifecycle Manager (OLM) namespace (--gather-olm option)
    • any additional custom namespaces (--additional-namespaces option)
  • Cluster-scoped resources (with --gather-cluster-scoped option)
  • Cluster audit logs (with --gather-audit-logs option)
  • Node usage and describes
  • OpenShift CLI version

Syntax

cpd-cli oadp gather info \
[--additional-namespaces=<namespace1, namespace2,
and so on>] \
[--cacert=<certificate-bundle-path>] \
[--dest-dir=<gather_directory>] \
[--gather-audit-logs=true|false] \
[--gather-cluster-scoped=true|false] \
[--gather-cpdbr-logs-only=true|false] \
[--gather-olm=true|false] \
[--help] \
[--insecure-skip-tls-verify=true|false] \
[--oadp-must-gather-image=<oadp-must-gather-image>] \
[--namespace=<oadp-namespace>] \
[--tenant-operator-namespace=<project-name>] \
[--timeout=<h,m,s>] \

# Global options
[--add_dir_header=true|false] \
[--alsologtostderr=true|false] \
[--cpd-namespace=<cpd-namespace>] \
[--kubeconfig=<kubeconfig-paths> \
[--log-level=info|debug|warn|error|panic|trace] \
[--log-backtrace-at=<source_code_file>:<line_number>] \
[--log_dir=<log_directory>] \
[--log_file=<log_file_name>] \
[--log_file_max_size=<uint>] \
[--logtostderr=true|false] \
[--namespace=<namespace-name>] \
[--one_output=true|false] \
[--skip_headers=true|false] \
[--skip_log_headers=true|false] \
[--stderrthreshold=<integer>] \
[--v=<integer>] \
[--verbose \
[--vmodule=<pattern1>=<n1>,<pattern2>=<n2>,<pattern3>=<n3>]

Arguments

Table 1: Global options arguments
Argument Description
<trace-location> The stack trace location
<severity> The log severity level

Options

Table 1: Command options
Option Description
--additional-namespaces Namespace collection of additional custom namespaces.
Status
Optional.
Syntax
--additional-namespaces=<namespace1, namespace2, and so on>
Default value
No default.
Valid values
A list of comma-separated namespace names.
--cacert The certificate bundle path to use when verifying TLS connections.
Status
Optional.
Syntax
--cacert=<certificate-bundle-path>
Default value
No default.
Valid values
A valid certificate bundle path.
--dest-dir The directory where gather info is built and saved. If not set, OS temp directory is used for building, and the zip is saved in the working directory.
Status
Optional.
Syntax
--dest-dir=<gather_directory>
Default value
No default
Valid values
Not applicable.
--gather-audit-logs Specifies whether to collect the cluster audit logs.
Status
Optional.
Syntax
--gather-audit-logs=true|false
Default value
false
Valid values
true
When set to true, cluster audit logs are collected.
false
Do not include the cluster audit logs.
--gather-cluster-scoped Specifies whether to collect cluster-scoped resources.
Status
Optional.
Syntax
--gather-cluster-scoped=true|false
Default value
false
Valid values
true
When set to true, cluster-scoped resources are collected.
false
Do not include cluster-scoped resources.
--gather-cpdbr-logs-only Specifies whether to collect only cpd-cli oadp and cpdbr-tenant-service logs.
Status
Optional.
Syntax
--gather-cpdbr-logs-only=true|false
Default value
false
Valid values
true
When set to true, only cpd-cli oadp and cpdbr-tenant-service logs are collected.
false
All namespace information is collected.
--gather-olm Specifies whether to collect the OpenShift Operator Lifecycle Manager (OLM) namespace.
Status
Optional.
Syntax
--gather-olm=true|false
Default value
false
Valid values
true
The OpenShift OLM namespace is collected.
false
The OpenShift OLM namespace is not collected.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--insecure-skip-tls-verify When set to 'true', the object store's TLS certificate are not checked for validity (not recommended for production).
Status
Optional.
Syntax
--insecure-skip-tls-verify=true|false
Default value
false
Valid values
false
The object store's TLS certificate are checked for validity.
true
When set to 'true', the object store's TLS certificate are not checked for validity (not recommended for production).
--oadp-must-gather-image The OADP must-gather image.
Status
Optional.
Syntax
--oadp-must-gather-image=<oadp-must-gather-image>
Default value
No default.
Valid values
A valid OADP must-gather image name. Example: registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3.
--tenant-operator-namespace Restrict the scope of backup or restore commands to tenant operand namespaces that include tenant specific Cloud Pak Foundation Service Operators and IBM Software Hub Operators only.
Status
Optional.
Syntax
--tenant-operator-namespace
Default value
No default.
Valid values

A valid namespace name.

Note: The following command is an alternative to using this option:
cpd-cli oadp client config set cpd-namespace=<cpd-namespace-name>

However, the option takes precedence over this command.

--timeout The wait timeout duration ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--timeout=<h,m,s>
Default value
1m0s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m

Global options

You can also use the following global options with this command:

Table 2: Command global options
Option Description
--add_dir_header Add the file directory to the header of log messages.
Status
Optional.
Syntax
--add_dir_header=true|false
Default value
false
Valid values
false
Do not add the file directory to the header of log messages.
true
Add the file directory to the header of log messages.
--alsologtostderr Log to standard error as well as files.
Status
Optional.
Syntax
--alsologtostderr=true|false
Default value
false
Valid values
false
Do not log to standard error as well as files.
true
Log to standard error as well as files.
Note: This option has no effect when --logtostderr=true.
--cpd-namespace The IBM Software Hub namespace in which the utility operates.
Status
Optional.
Syntax
--cpd-namespace=<cpd-namespace>
Default value
No default value.
Valid values
A valid IBM Software Hub namespace.
Tip: The following command is an alternative to using this option:
cpd-cli oadp client config set cpd-namespace=<cpd-namespace>
However, the option takes precedence over the command.
--kubeconfig Paths to a kubeconfig. Only required if out-of-cluster.
Status
Optional.
Syntax
--kubeconfig=<kubeconfig-paths>
Default value
No default.
Valid values
Valid kubeconfig paths.
--log-level The command log level.
Status
Optional.
Syntax
--log-level=info|debug|warn|error|panic|trace
Default value
info
Valid values
debug
Debug messages are written to the log.
error
Error messages are written to the log.
info
Informative messages are written to the log.
panic
Panic messages are written to the log.
trace
Trace messages are written to the log.
warn
Warning messages are written to the log.
--log-backtrace-at When logging hits <source_code_file> at line <line_number>, emit a stack trace. The default is any file at line 0.
Status
Optional.
Syntax
--log-backtrace-at=<source_code_file>:<line_number>
Default value

No file and line 0 ( :0)

Valid values
A location in the source code file with the format <source_code_file>:<line_number>.
--log_dir If non-empty, write log files in this directory.
Status
Optional.
Syntax
--log_dir=<log_directory>
Default value
No default.
Valid values
A valid directory.
Note: This option has no effect when --logtostderr=true.
--log_file If non-empty, use this log file.
Status
Optional.
Syntax
--log_file=<log_file_name>
Default value
No default.
Valid values
A valid directory.
Note: This option has no effect when --logtostderr=true.
--log_file_max_size The maximum size, in MB, that a log file can grow to. If you specify 0, the maximum file size is unlimited.
Status
Optional.
Syntax
--log_file_max_size=<uint>
Default value
1800
Valid values
A valid unsigned integer.
Note: This option has no effect when --logtostderr=true.
--logtostderr Log to standard error instead of files.
Status
Optional.
Syntax
--logtostderr=true|false
Default value
true
Valid values
true
Log to standard error instead of files.
false
Log to files.
--namespace

-n

The namespace where OADP is installed.
Status
Optional.
Syntax
--namespace=<oadp-namespace>
Default value
No default value.
Valid values
Valid namespace name.
Tip: The following command is an alternative to using this option:
cpd-cli oadp client config set namespace=<OADP-operator-namespace>
However, the option takes precedence over the command.
--one_output Specifies whether to only write logs to their native severity level.
Status
Optional.
Syntax
--one_output=true|false
Default value
false
Valid values
false
Write logs to their native severity level and also to each lower severity level.
true
Write logs only to their native severity level.
Note: This option has no effect when --logtostderr=true.
--skip_headers Specifies whether to avoid header prefixes in log messages.
Status
Optional.
Syntax
--skip_headers
Default value
false
Valid values
false
Do not avoid header prefixes in log messages.
true
Avoid header prefixes in log messages.
--skip_log_headers Specifies whether to avoid header prefixes when opening log files.
Status
Optional.
Syntax
--skip_log_headers
Default value
false
Valid values
false
Do not avoid headers when opening log files.
true
Avoid headers when opening log files.
Note: This option has no effect when --logtostderr=true.
--stderrthreshold Logs at or above the specified severity threshold go to stderr. The threshold is used when you enable writing to files and stderr.
Status
Optional.
Syntax
--stderrthreshold=<integer>
Default value
2
Valid values
Any positive integer.
Note: This option has no effect when --logtostderr=true or .--alsologtostderr=false
--v

-v

Number for the log level verbosity.
Status
Optional.
Syntax
--v=<integer>
Default value
No default.
Valid values
Any valid positive integer.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.
--vmodule A comma-separated list of pattern=N settings for file-filtered logging.
Status
Optional.
Syntax
--vmodule=<pattern1>=<n1>,<pattern2>=<n2>,<pattern3>=<n3>
Default value
No default.
Valid values

A valid comma-separated list of patterns with the format <pattern>=<n>.

Examples

Note: The following examples use the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For more information, see Setting up installation environment variables.

Gather only log information
cpd-cli oadp gather info \
--tenant-operator-namespace=${PROJECT_CPD_INST_OPERATORS} \
--gather-cpdbr-logs-only=true \
--insecure-skip-tls-verify \
--log-level debug \
--verbose
Gather information, with audit logs collected
Note: Audit logs can significantly increase the size of the zip file.
cpd-cli oadp gather info \
--namespace=oadp-operator \
--tenant-operator-namespace=${PROJECT_CPD_INST_OPERATORS} \
--gather-cluster-scoped=true \
--gather-olm=true \
--gather-audit-logs=true \
--timeout=30m
--insecure-skip-tls-verify \
--log-level debug \
--verbose