Syntax
cpd-cli oadp backup validate \
--tenant-operator-namespace \
--backup-names=<backup_name1, backup_name2, and so on> \
[--backup-type] \
[--download-timeout=<h,m,s>] \
[--exclude-resources=<resource.group1,resource.group2,...>] \
[--hook-kind=br|checkpoint] \
[--include-namespaces=<project-name1,project-name2,...>] \
[--include-resources=<resource-name1,resource-name2,...>] \
[--insecure-skip-tls-verify=true|false] \
[--spec-version=<spec-version>] \
# 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 traceLocation=<integer>] \
[--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 severity=<integer>] \
[--v=<integer>] \
[--verbose \
[--vmodule moduleSpec=<pattern1, pattern2, and so on>]
Arguments
Table 1: Command arguments
| Argument |
Description |
<backup-name1>, <backup-name2> |
The names of the backups to validate. |
Table 2: Global options arguments
| Argument |
Description |
<trace-location> |
The stack trace location |
<severity> |
The log severity level |
Options
Table 1: Command options
| Option |
Description |
--backup-names |
A valid list of comma-separated
names of existing backups that will be validated.
- Status
- Required.
- Syntax
--backup-names=<backup_name1, backup_name2, and so on>
- Default value
- No default.
- Valid values
- The list of comma-separated backup names to validate before restoring.
|
--backup-type |
The type of object that is being
backed up.
- Status
- Optional.
- Syntax
--backup-type=<backup-object-type>
- Default value
- cpd
- Valid values
-
- cpd
- The object that is being backed up is an IBM Software Hub instance.
- singleton
- The object that is being backed up is an IBM Software Hub singleton. For example, the scheduling service.
|
--download-timeout |
Backups download
timeout.
- Status
- Optional.
- Syntax
--download-timeout=<h,m,s>
- Default value
30m0s
- Valid values
- Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
|
--exclude-resources |
Resources to exclude from
the restore, formatted as resource.group (for example,
storageclasses.storage.k8s.io).
- Status
- Optional.
- Syntax
--exclude-resources=<resource.group1,resource.group2,...>
- Default value
- No default.
- Valid values
- Valid
resource.group pairings.
|
|
--help
-h
|
Display command
help.
- Status
- Optional.
- Syntax
--help
- Default value
- No default.
- Valid values
- Not applicable.
|
--hook-kind |
The backup hook type. By default,
backup configmap pre-hook and post-hooks are called and are used for offline backups. When the value
is "checkpoint", checkpoint backup pre-hook and post-hooks are called and are used for
non-disruptive backups.
- Status
- Optional.
- Syntax
--hook-kind=br|checkpoint
- Default value
br
- Valid values
-
br
- The backup configmap prehooks and posthooks are called (used for offline
backups).
checkpoint
- The checkpoint prehooks and posthooks are called (used for non-disruptive backups).
|
--include-namespaces |
The namespaces to
include in the backup validation. Do not specify this option with
--tenant-operator-namespace.
- Status
- Optional.
- Syntax
--include-namespaces=<project-name1,project-name2,...>
- Default value
${PROJECT_CPD_INST_OPERANDS}
- Valid values
- Any valid project names. (Comma-separated string
array.)
5.1.1 and later This option is merged
with IBM® Software Hub tenant namespaces.
|
--include-resources |
Resources to include in the
backup, formatted as resource.group, such as storageclasses.storage.k8s.io (use '\*' for all
resources).
- Status
- Optional.
- Syntax
--include-resources=<resource-name1,resource-name2,...>
- Default value
- No default.
- Valid values
- Any valid resource names. (Comma separated string array. Use
'*' for all resources.)
|
--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 not checked for validity.
true
- When set to 'true', the object
store's TLS certificate are not checked for validity (not recommended for
production).
|
--spec-version |
aux ConfigMap to filter
by.
- Status
- Optional.
- Syntax
--spec-version=<spec-version>
- Default value
""
- Valid values
- A valid string value. For example, 2.0.0.
|
|
--tenant-operator-namespace
|
The IBM Software
Hub tenant operator namespace. You can use this option together with --include-namespaces. In this
case, duplicate namespaces are ignored.
- Status
- Optional.
- Syntax
--tenant-operator-namespace
- Default value
- No default.
- Valid values
-
A valid namespace name.
Notes: 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.
5.1.1 and later You can use this option
with --include-namespaces. --include-namespaces are merged with IBM Software Hub tenant namespaces.
|
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
-
5.1.0
zen
5.1.1 and later 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-name>
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.
-
warn
- Warning messages are written to the log.
|
--log-backtrace-at traceLocation |
When logging hits line file:N,
emit a stack trace.
- Status
- Optional.
- Syntax
--log-backtrace-at traceLocation=<integer>
- Default value
-
0.
- Valid values
- Any positive integer.
|
--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
-
5.1.0oadp-operator
5.1.1 and later 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 severity |
Logs at or above the specified
threshold. Go to stderr when writing to files and stderr.
- Status
- Optional.
- Syntax
--stderrthreshold severity=<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 moduleSpec |
Comma-separated list of pattern=N
settings for file-filtered logging.
- Status
- Optional.
- Syntax
--vmodule moduleSpec=<pattern1, pattern2, and so on>
- Default value
No default.
- Valid values
|
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.
- Validate online backups.
-
cpd-cli oadp backup validate \
--tenant-operator-namespace=${PROJECT_CPD_INST_OPERATORS} \
--namespace=oadp-operator \
--backup-names=tenant-online-b1, tenant-online-b2 \
--hook-kind=checkpoint \
--insecure-skip-tls-verify \
--log-level=trace \
--verbose \
- Validate offline backups.
-
cpd-cli oadp backup validate \
--tenant-operator-namespace=${PROJECT_CPD_INST_OPERATORS} \
--namespace=oadp-operator \
--backup-names=tenant-offline-b1, tenant-offline-b2 \
--hook-kind=br \
--insecure-skip-tls-verify \
--log-level=trace \
--verbose \