oadp backup precheck

Important: IBM Cloud Pak® for Data Version 4.8 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.8 reaches end of support. For more information, see Upgrading from IBM Cloud Pak for Data Version 4.8 to IBM Software Hub Version 5.1.

Run the backup precheck command before any subsequent backup steps.

Extended Description

The backup precheck command checks that the primary instance of every EDB Postgres cluster is in sync with its replicas.

If the check fails, the backup precheck command reports the error and exits with a non-zero exit code. Otherwise, it returns successfully with a zero exit code.

The backup precheck command also logs the following information:
  1. The OpenShift® and Kubernetes version numbers.
  2. The Cloud Pak for Data version number.

This command is also available in oadp REST mode.

Syntax

cpd-cli oadp backup precheck \
[--help] \
[--ignore-warnings=true|false] \
[--include-namespaces=<project-name1,project-name2,...>] \
[--tenant-operator-namespace=<project-name>] \
[--verbose] \

Arguments

The oadp backup precheck command has no arguments.

Options

Option Description

--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
--include-namespaces A comma-separated list of namespaces to check.
Status
Required.
Syntax
--include-namespaces=<project-name1,project-name2,...>
Default value
${PROJECT_CPD_INST_OPERANDS}
Valid values
Any valid project names. (Comma-separated string array.)
--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 Cloud Pak for Data Operators only.
Status
Required.
Syntax
--tenant-operator-namespace=<project-name>
Default value
No default.
Valid values
Any valid project name.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Table 1: Command options

Notes:
  • Only the --tenant-operator-namespace flag or the --include-namespaces flag can be used at a time. Running the command with both flags returns an error.
  • Check tethered namespaces.

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 backup precheck
cpd-cli oadp backup precheck \
--tenant-operator-namespace ${PROJECT_CPD_INST_OPERATORS} \
--verbose
Sample response
processing request...
oadp namespace: openshift-adp
cpd namespace: zen

oc version:
Client Version: 4.12.22
Kustomize Version: v4.5.7
Server version: 4.12.22
Kubernetes Version: v1.25.10+8c21020

cpd version: 4.8.0
checking namespaces: [ibm-common-services zen]

warning: no edb clusters found in namespace="ibm-common-services", skipping...
performing edb cluster in-sync check: edbCluster="zen-metastore-edb"
              Pod Name         Role          LSN
            ----------   ----------   ----------
   zen-metastore-edb-1      Primary   2/2608D550
   zen-metastore-edb-2      Replica   2/2608D550

edb in-sync check succeeded: edbCluster="zen-metastore-edb"

precheck took 668.37435s
precheck command completed