oadp
tenant-backup create
Create a backup of an entire IBM Software Hub instance.
Syntax
cpd-cli oadp tenant-backup create <tenant-backup-name> \
[--aux-service-image-prefix=<backup-hook-image-prefix>] \
[--backup-validation-exclude-resources=<resource.group.1,resource.group.2,...>] \
[--backup-validation-include-resources=<resource.group1,resource.group2,...>] \
[--cleanup-completed-resources=true|false] \
[--disable-inverseops=true|false] \
[--enforce-check=true|false] \
[--image-prefix=<image-registry-prefix>] \
[--insecure-skip-tls-verify=true|false] \
[--mode=online|offline] \
[--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>] \
[--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>] \
[--values=<yaml-file-name1,yaml-file-name2,...>] \
[--verbose] \
[--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 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 |
|---|---|
<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 |
|---|---|
--aux-service-image-prefix |
Specify the backup hook job image
prefix (if configurable).
|
--backup-validation-exclude-resources |
Resources to exclude from the
end-of-backup backup validation. Formatted as resource.group (for example,
storageclasses.storage.k8s.io).
|
--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.
|
--cleanup-completed-resources |
When set to "true", deletes
completed Kubernetes jobs and pods.
|
--disable-inverseops |
Disable inverseops upon a fatal
plan execution error.
|
--enforce-check |
Check OADP
DataProtectionApplication (dpa) resources and perform other
validations.
|
--help
|
Display command
help.
|
--image-prefix |
Specify the image registry
prefix.
|
--insecure-skip-tls-verify |
When set to 'true', the object
store's TLS certificate are not checked for validity (not recommended for
production).
|
--mode |
The backup
mode.
|
--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).
|
--precheck-edb-sync-retries |
Number of times to retry the
backup prehceck's EDB sync check upon failure.
|
--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).
|
--precheck-exclude-checks |
Comma separated list of backup
precheck checks to skip.
|
--precheck-ignore-warnings |
Specifies whether backup precheck
warnings will not be 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.
|
--registry-check-exclude-add-on-ids |
Comma-separated list of addon ids to be excluded from the global registry check.
|
--registry-yaml-file-path |
The path to the global YAML file
to override the default compiled registry YAML.
|
--retries |
Number of retries if a backup step
fails.
|
--scale-wait-timeout |
The scale wait timeout duration
('h' for hours, 'm' for minutes, 's' for seconds).
|
--skip-checkpoint |
Skip checkpoint
hooks.
|
--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.
|
--skip-posthooks |
Skip post-backup
hooks.
|
--skip-precheck |
Skip precheck
hooks.
|
--skip-prehooks |
Skip pre-backup
hooks.
|
--skip-registry-check |
If set to true, skips the global
registry check that runs prior to the tenant backup
operation.
|
--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.
|
--storage-location |
The backup location to use for the
backup.
|
--tenant-operator-namespace |
The IBM
Software Hub tenant operator namespace.
|
--try-skip-volume-selinux-label |
Add the TrySkipVolumeSELinuxLabel
annotation and selinux runtimeClassName to the
cpdbr-vol-mnt-pod.
|
--ttl |
Specify how long to keep the data
('h' for hours, 'm' for minutes, 's' for seconds).
|
--values
|
YAML files
containing custom parameters to be passed to ConfigMap
hooks.
|
--verbose |
Logs include more detailed
messages.
|
--vol-mnt-pod-cpu-limit |
Set the CPU limit for the
cpdbr-vol-mnt pod.
|
--vol-mnt-pod-cpu-request |
Set the CPU request for the
cpdbr-vol-mnt pod.
|
--vol-mnt-pod-mem-limit |
Set the memory limit for the
cpdbr-vol-mnt pod.
|
--vol-mnt-pod-mem-request |
Set the memory request for the
cpdbr-vol-mnt pod.
|
--vol-mnt-service-account |
The service account for the
cpdbr-vol-mnt pod.
|
--volume-snapshot-locations |
List of locations (at most one per
provider) where volume snapshots are stored.
|
--wait-timeout |
The wait timeout setting ('h' for
hours, 'm' for minutes, 's' for seconds).
|
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.
|
--alsologtostderr |
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.
|
--kubeconfig |
Paths to a kubeconfig. Only
required if out-of-cluster.
|
--log-level |
The command log
level.
|
--log-backtrace-at traceLocation |
When logging hits line file:N,
emit a stack trace.
|
--log-dir |
If non-empty, write log files in
this directory.
|
--log-file |
If non-empty, use this log
file.
|
--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.
|
--logtostderr |
Log to standard error instead of
files.
|
--namespace
|
The namespace where OADP is
installed.
|
--one-output |
Specifies whether to only write
logs to their native severity level.
|
--skip-headers |
Specifies whether to avoid header
prefixes in log messages.
|
--skip-log-headers |
Specifies whether to avoid header
prefixes 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.
|
--v
|
Number for the log level
verbosity.
|
--verbose |
Logs include more detailed
messages.
|
--vmodule moduleSpec |
Comma-separated list of pattern=N
settings for file-filtered logging.
|
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