oadp restore precheck

Run validation to ensure that the OADP namespace exists, resources are available, and the backup exists before restoring a backup.

This command checks for the following issues:

  • The OADP project does not exist.
  • A Velero instance is not running or its pod is not healthy.
  • The OADP backup storage location custom resource is not in the Available state.
  • The specified backup name does not exist.
  • The backup did not complete successfully or has errors or warnings.
  • Projects that are associated with the backup do not exist.

Syntax

cpd-cli oadp restore precheck \
--backup-names=<backup_name1, backup_name2, and so on> \
[--cacert=<certificate-bundle-path>] \
[--ignore-warnings=true|false] \
[--insecure-skip-tls-verify=true|false]

Arguments

The oadp restore precheck command has no arguments.

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.
--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.
--cpd-namespace The Cloud Pak for Data control plane namespace in which the utility operates.
Status
Optional.
Syntax
--cpd-namespace=${PROJECT_CPD_INST_OPERANDS}
Default value
${PROJECT_CPD_INST_OPERANDS}
Valid values
A valid Cloud Pak for Data control plane namespace.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--ignore-warnings When set to `true`, any backups that have warnings will not be flagged as errors during restore precheck.
Status
Optional.
Syntax
--ignore-warnings=true|false
Default value
false
Valid values
true|false
--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).
--log-level The command log level.
Status
Optional.
Syntax
--log-level=info|debug|warn|error|panic
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.
--namespace The namespace name in which the utility should operate.
Status
Optional.
Syntax
--namespace=<namespace-name>
Default value
oadp-operator
Valid values
A valid project (namespace) name.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Table 1: Command options

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 Best practice: Setting up installation environment variables.

Run restore prechecks.
cpd-cli oadp restore precheck --backup-names=zen-backup-operators,zen-backup
Sample response.
processing request...
oadp namespace: openshift-adp
cpd namespace: zen
Error: pre-check failed with error: namespace ibm-common-services already exists in the restore cluster and must be deleted before proceeding with restore (Status: Active)