oadp tenant-backup create

Create a backup of an entire IBM Software Hub instance.

Syntax

cpd-cli oadp tenant-backup create <tenant-backup-name> \
[--backup-validation-exclude-resources=<resource.group.1,resource.group.2,...>] \
[--backup-validation-include-resources=<resource.group1,resource.group2,...>] \
[--cacert=<certificate-bundle-path>] \
[--cacert-file=<certificate-bundle-path>] \
[--cleanup-completed-resources=true|false] \
[--disable-inverseops=true|false] \
[--enforce-check=true|false] \
[--image-prefix=<image-registry-prefix>] \
[--insecure-skip-tls-verify=true|false] \
[--limitrange-cpd-request=<cpu-limit>] \
[--limitrange-cpu-limit=<cpu-limit>] \
[--limitrange-memory-limit=<memory-limit>] \
[--limitrange-memory-request=<memory-limit>] \
[--max-parallel-ops=<integer>] \
[--mode=online|offline] \
[--output=json|yaml|table] \
[--precheck-custom-plugins=[<plugin1_name>,<plugin2_name>...]] \
[--precheck-edb-replica-lag-threshold=<h,m,s>] \
[--precheck-edb-sync-retries=<integer>] \
[--precheck-edb-sync-retry-wait-duration=<h,m,s>] \
[--precheck-exclude-checks=[<precheck1_name>,<precheck2_name>...]] \
[--precheck-ignore-warnings=true|false] \
[--precheck-include-checks=[<precheck1_name>,<precheck2_name>...]] \
[--registry-check-exclude-add-on-ids=<addon_id1,addonid2,...>] \
[--registry-yaml-file-path=<path_global_yaml_file>] \
[--retries=<integer>] \
[--runtime-mode=<runtime-mode>] \
[--scale-wait-timeout=<h,m,s>] \
[--skip-checkpoint
[--skip-hooks] \
[--skip-posthooks] \
[--skip-precheck] \
[--skip-prehooks] \
[--skip-registry-check] \
[--snapshot-volumes=true|false] \
[--storage-location=<backup-location>] \
[--tenant-operator-namespace] \
[--try-skip-volume-selinux-label=true|false] \
[--ttl=<h,m,s>] \
[--use-limit-range=true|false] \
[--values=<yaml-file-name1,yaml-file-name2,...>] \
[--vendor-backup-name-label=<vendor-backup-name-label>] \
[--vendor-label=<vendor-label>] \
[--vol-mnt-pod-cpu-limit=<cpu-limit-value>] \
[--vol-mnt-pod-cpu-request=<cpu-request-value>] \
[--vol-mnt-pod-mem-limit=<memory-limit-value>] \
[--vol-mnt-pod-mem-request=<memory-request-value>] \
[--vol-mnt-service-account=<service-request-value>] \
[--volume-snapshot-locations=<volume-snapshot-location1,volume-snapshot-location2,...>] \
[--wait-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: Command arguments
Argument Description
<tenant-backup-name> The name of the backup to create.
Table 2: Global options arguments
Argument Description
<trace-location> The stack trace location
<severity> The log severity level

Options

This command has the following options:

Table 1: Command options
Option Description
--backup-validation-exclude-resources Resources to exclude from the end-of-backup backup validation. Formatted as resource.group (for example, storageclasses.storage.k8s.io).
Status
Optional.
Syntax
--backup-validation-exclude-resources=<resource.group.1,resource.group.2,...>
Default value
No default.
Valid values
Valid resource.group pairings.
--backup-validation-include-resources Resources to include from the end-of-backup backup validation, formatted as resource.group (for example, storageclasses.storage.k8s.io). Use '*' for all resources.
Status
Optional.
Syntax
--backup-validation-include-resources=<resource.group1,resource.group2,...>
Default value
No default.
Valid values
Valid resource.group pairings.
--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.
--cacert-file Certificate bundle path for TLS connections.
Status
Optional.
Syntax
--cacert-file=<certificate-bundle-path>
Default value
No default.
Valid values
A valid certificate bundle path.
--cleanup-completed-resources When set to "true", deletes completed Kubernetes jobs and pods.
Status
Optional.
Syntax
--cleanup-completed-resources=true|false
Default value
true
Valid values
false
Does not delete completed Kubernetes jobs and pods.
true
Deletes completed Kubernetes jobs and pods.
--disable-inverseops Disable inverseops upon a fatal plan execution error.
Status
Optional.
Syntax
--disable-inverseops
Default value
false
Valid values
false
Does not disable inverseops.
true
Disables inverseops.
--enforce-check Check OADP DataProtectionApplication (dpa) resources and perform other validations.
Status
Optional.
Syntax
--enforce-check=true|false
Default value
true
Valid values
true|false
--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--image-prefix Specify the image registry prefix.
Status
Optional.
Syntax
--image-prefix=<image-registry-prefix>
Default value
registry.redhat.io/ubi9
Valid values
  • icr.io/cpopen/cpd
  • registry.redhat.io/ubi9
  • ${PRIVATE_REGISTRY_LOCATION}
--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).
--limitrange-cpd-request CPU limit for requests.
Status
Optional.
Syntax
--limitrange-cpd-request=<cpu-limit>
Default value
500m
Valid values
A valid CPU limit value.
--limitrange-cpu-limit CPU limit for resources.
Status
Optional.
Syntax
--limitrange-cpu-limit=<cpu-limit>
Default value
2
Valid values
A valid CPU limit value.
--limitrange-memory-limit Memory limit for resources.
Status
Optional.
Syntax
--limitrange-memory-limit=<memory-limit>
Default value
4Gi
Valid values
A valid memory limit value.
--limitrange-memory-request Memory limit for requests.
Status
Optional.
Syntax
--limitrange-memory-request=<memory-limit>
Default value
256Mi
Valid values
A valid memory limit value.
--max-parallel-ops Maximum parallel operations.
Status
Optional.
Syntax
--max-parallel-ops=<integer>
Default value
5
Valid values
A valid integer value.
--mode The backup mode.
Status
Optional.
Syntax
--mode=online|offline
Default value
online
Valid values
online
Creates an online backup.
offline
Creates an offline backup.
--output

-o

Specify an output format. Valid formats include json, yaml, or table (the default format).
Status
Optional.
Syntax
--output=json|yaml|table
Default value
table
Valid values
  • json
  • text
--precheck-custom-plugins List of precheck custom plugins.
Status
Optional.
Syntax
--precheck-custom-plugins=[<plugin1_name>,<plugin2_name>...]
Default value
No default.
Valid values
stringArray
--precheck-edb-replica-lag-threshold EDB cluster replica lag threshold for the backup precheck's EDB sync check in golang duration, in string format ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--precheck-edb-replica-lag-threshold=<h,m,s>
Default value
30m0s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
--precheck-edb-sync-retries Number of times to retry the backup prehceck's EDB sync check upon failure.
Status
Optional.
Syntax
--precheck-edb-sync-retries=<integer>
Default value
5
Valid values
Plain integer
--precheck-edb-sync-retry-wait-duration Wait duration of the backup precheck's EDB sync check retries upon failure, in string format ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--precheck-edb-sync-retry-wait-duration=<h,m,s>
Default value
1s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
--precheck-exclude-checks Comma separated list of backup precheck checks to skip.
Status
Optional.
Syntax
--precheck-exclude-checks=[<precheck1_name>,<precheck2_name>...]
Default value
No default.
Valid values
OcVersion
Checks the Red Hat OpenShift version.
CpdCliOadpVersion
Checks the cpd-cli oadp version.
OadpOperatorCSV
Checks the OADP operator version.
TerminatingPVCs
Checks for terminating PVCs.
EdbClustersInSync
Checks that all Edb Postgres cluster instances are in sync with their replicas.
PreCheckHooks
Checks backup hooks.
CSIPluginExists
Checks that the CSI plugin exists.
ValidVolumeSnapshotClass
Checks that the volume snapshot class is valid.
--precheck-ignore-warnings Specifies whether backup precheck warnings will not be flagged as errors.
Status
Optional.
Syntax
--precheck-ignore-warnings=true|false
Default value
true
Valid values
true
Backup precheck warnings are not flagged as errors.
false
Backup precheck warnings are flagged as errors.
--precheck-include-checks Comma separated list of backup precheck checks to selectively run. By default, all checks are executed if this option is not specified.
Status
Optional.
Syntax
--precheck-include-checks=[<precheck1_name>,<precheck2_name>...]
Default value
No default.
Valid values
OcVersion
Checks the Red Hat OpenShift version.
CpdCliOadpVersion
Checks the cpd-cli oadp version.
OadpOperatorCSV
Checks the OADP operator version.
TerminatingPVCs
Checks for terminating PVCs.
EdbClustersInSync
Checks that all Edb Postgres cluster instances are in sync with their replicas.
PreCheckHooks
Checks backup hooks.
CSIPluginExists
Checks that the CSI plugin exists.
ValidVolumeSnapshotClass
Checks that the volume snapshot class is valid.
--registry-check-exclude-add-on-ids Comma-separated list of addon ids to be excluded from the global registry check.
Status
Optional.
Syntax
--registry-check-exclude-add-on-ids=<addon_id1,addonid2,...>
Default value
"volumes,zen-dataplanes,zen-organizations,zen-secrets,databases"
Valid values
One or more valid addon ids.
--registry-yaml-file-path The path to the global YAML file to override the default compiled registry YAML.
Status
Optional.
Syntax
--registry-yaml-file-path=<path_global_yaml_file>
Default value
No default
Valid values
Valid file path.
--retries Number of retries if a backup step fails.
Syntax
--retries=<integer>
Default value
0
Valid values
Plain integer
--runtime-mode Force runtime-mode override.
Status
Optional.
Syntax
--runtime-mode=<runtime-mode>
Default value
operator
Valid values
A valid runtime mode value.
--scale-wait-timeout The scale wait timeout duration ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--scale-wait-timeout=<h,m,s>
Default value
30m0s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
--skip-checkpoint Skip checkpoint hooks.
Status
Optional.
Syntax
--skip-checkpoint
Default value
No default.
Valid values
Not applicable.
--skip-hooks Skip all backup hooks. If set to true, all configmap hook types will be skipped, even if --skip-precheck, --skip-checkpoint, --skip-prehooks, or --skip-posthooks are false.
Status
Optional.
Syntax
--skip-hooks
Default value
No default
Valid values
Not applicable.
--skip-posthooks Skip post-backup hooks.
Status
Optional.
Syntax
--skip-posthooks
Default value
No default.
Valid values
Not applicable.
--skip-precheck Skip precheck hooks.
Status
Optional.
Syntax
--skip-precheck
Default value
No default.
Valid values
Not applicable.
--skip-prehooks Skip pre-backup hooks.
Status
Optional.
Syntax
--skip-prehooks
Default value
No default.
Valid values
Not applicable.
--skip-registry-check If set to true, skips the global registry check that runs prior to the tenant backup operation.
Status
Optional.
Syntax
--skip-registry-check=true|false
Default value
false
Valid values
true
Skips the global registry check.
false
Runs the global registry check.
--snapshot-volumes Take snapshots of persistent volumes as part of the backup. When set to false, the volume is backed-up using restic. When set to true, a volume snapshot is created.
Status
Optional.
Syntax
--snapshot-volumes=true|false
Default value
false
Valid values
false
The volume is backed-up using Restic.
true
A volume snapshot is created.
--storage-location The backup location to use for the backup.
Status
Optional.
Syntax
--storage-location=<backup-location>
Default value
No default.
Valid values
A valid backup location.
--tenant-operator-namespace The IBM Software Hub tenant operator namespace.
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.

--try-skip-volume-selinux-label Add the TrySkipVolumeSELinuxLabel annotation and selinux runtimeClassName to the cpdbr-vol-mnt-pod.
Status
Optional.
Syntax
--try-skip-volume-selinux-label=true|false
Default value
true
Valid values
true|false
--ttl Specify how long to keep the data ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--ttl=<h,m,s>
Default value
8760h
Valid values
A time setting in the format <h,m,s>.
--use-limit-range Create LimitRanges when ResourceQuotas present.
Status
Optional.
Syntax
--use-limit-range=true|false
Default value
false
Valid values
false
Do not create LimitRanges when ResourceQuotas are present.
true
Create LimitRanges when ResourceQuotas are present.
--values

-f

YAML files containing custom parameters to be passed to ConfigMap hooks.
Status
Optional.
Syntax
--values=<yaml-file-name1,yaml-file-name2,...>
Default value
No default.
Valid values
One or more YAML file names.
--vendor-backup-name-label Vendor backup name label for backup meta.
Status
Optional.
Syntax
--vendor-backup-name-label=<vendor-backup-name-label>
Default value
No default.
Valid values
A valid vendor backup name label.
--vendor-label Vendor label for backup meta.
Status
Optional.
Syntax
--vendor-label=<vendor-label>
Default value
No default.
Valid values
A valid vendor label.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.
--vol-mnt-pod-cpu-limit Set the CPU limit for the cpdbr-vol-mnt pod.
Status
Optional.
Syntax
--vol-mnt-pod-cpu-limit=<cpu-limit-value>
Default value
500m
Valid values
A CPU limit value.
--vol-mnt-pod-cpu-request Set the CPU request for the cpdbr-vol-mnt pod.
Status
Optional.
Syntax
--vol-mnt-pod-cpu-request=<cpu-request-value>
Default value
100m
Valid values
Plain integer or fixed-point number that uses one the following quantity suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.

Examples: 0, 100m, 256Mi, 1Gi

--vol-mnt-pod-mem-limit Set the memory limit for the cpdbr-vol-mnt pod.
Status
Optional.
Syntax
--vol-mnt-pod-mem-limit=<memory-limit-value>
Default value
512Mi
Valid values
Plain integer or fixed-point number that uses one the following quantity suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.

Examples: 0, 100m, 256Mi, 1Gi

--vol-mnt-pod-mem-request Set the memory request for the cpdbr-vol-mnt pod.
Status
Optional.
Syntax
--vol-mnt-pod-mem-request=<memory-request-value>
Default value
256Mi
Valid values
Plain integer or fixed-point number that uses one the following quantity suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.

Examples: 0, 100m, 256Mi, 1Gi

--vol-mnt-service-account The service account for the cpdbr-vol-mnt pod.
Status
Optional.
Syntax
--vol-mnt-service-account=<service-request-value>
Default value
default
Valid values
Valid cpdbr-vol-mnt service account.
--volume-snapshot-locations List of locations (at most one per provider) where volume snapshots are stored.
Status
Optional.
Syntax
--volume-snapshot-locations=<volume-snapshot-location1,volume-snapshot-location2,...>
Default value
No default.
Valid values
Valid volume snapshot locations.
--wait-timeout The wait timeout setting ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--wait-timeout=<h,m,s>
Default value
10m0s
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>.

Example

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.

Create a backup of an IBM Software Hub instance (${TENANT_BACKUP_NAME}) in an air-gapped environment.
cpd-cli oadp tenant-backup create ${TENANT_BACKUP_NAME} \
--tenant-operator-namespace ${PROJECT_CPD_INST_OPERATORS} \
--image-prefix=${PRIVATE_REGISTRY_LOCATION} \
--log-level=debug \
--verbose