oadp backup-location create

Create a backup storage location.

Syntax

cpd-cli oadp backup-location create <cpd-snapshot-name> \
--access-mode=ReadWrite|ReadOnly \
--bucket=<object-storage-bucket-name> \
--config=<map<key, value>> \
--provider=<backup-storage-provider-name> \
[--backup-sync-period=<h,m,s>] \
[--cacert=<certificate-bundle-path>] \
[--cpd-namespace=${PROJECT_CPD_INSTANCE}] \
[--credential=<map<key, value>>] \
[--labels=<map<label,label,...>>] \
[--log-level=info|debug|warn|error|panic] \
[--prefix=<prefix-name>] \
[--namespace=<namespace-name>] \
[--validation-frequency=<h,m,s>] \
[--verbose]

Arguments

Table 1: Command options
Argument Description
<cpd-snapshot-name> The name of the backup storage location.

Options

Option Description
--access-mode The access mode for the backup storage location.
Status
Required.
Syntax
--access-mode=ReadWrite|ReadOnly
Default value
ReadWrite
Valid values
  • ReadWrite
  • ReadOnly
--backup-sync-period Specify how often to synchronize all backups in the object storage with backup API objects in the cluster ('h' for hours, 'm' for minutes, 's' for seconds). Synchronization is disabled when the value is set to 0s.
Status
Optional.
Syntax
--backup-sync-period=<h,m,s>
Default value
1m
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
--bucket The object storage bucket name where backups are stored.
Status
Required.
Syntax
--bucket=<object-storage-bucket-name>
Default value
No default.
Valid values
A valid object storage bucket name.
--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.
--config The configuration key-value pairs.
Status
Required.
Syntax
--config=<map<key, value>>
Default value
No default.
Valid values
Any valid key-value pairs.
--cpd-namespace The Cloud Pak for Data control plane namespace in which the utility operates.
Status
Optional.
Syntax
--cpd-namespace=${PROJECT_CPD_INSTANCE}
Default value
${PROJECT_CPD_INSTANCE}
Valid values
A valid Cloud Pak for Data control plane namespace.
--credential The credential that is used as a key-value pair where the key is the Kubernetes secret name and the value is the secret data key name. Only one value is allowed.
Status
Optional.
Syntax
--credential=<map<key, value>>
Default value
No default.
Valid values
Any valid key-value pair. Only one value is allowed.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--labels Labels to apply to the backup storage location.
Status
Optional.
Syntax
--labels=<map<label,label,...>>
Default value
No default.
Valid values
Valid label names. (Comma separated map string array list.)
--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
${PROJECT_CPD_INSTANCE}
Valid values
A valid project (namespace) name.
--prefix The prefix under which all data is stored within the bucket.
Status
Optional.
Syntax
--prefix=<prefix-name>
Default value
No default.
Valid values
Any valid prefix name.
--provider The backup storage provider name (for example, aws, azure, gcp).
Status
Required.
Syntax
--provider=<backup-storage-provider-name>
Default value
No default.
Valid values
Any valid backup storage provider name.
--validation-frequency How often to validate the backup storage location ('h' for hours, 'm' for minutes, 's' for seconds). Validation is disabled when the value is set to 0s.
Status
Optional.
Syntax
--validation-frequency=<h,m,s>
Default value
1m
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Examples

Note: The following examples use the recommended installation environment variables.

Use a script to create environment variables with the correct values for your environment. For more information, see Best practice: Setting up install variables.

Create a backup storage location.
cpd-cli oadp backup-location create <cpd-snapshot-name>\
--access-mode=ReadWrite \
--bucket=<object-storage-bucket-name>] \
--config=<map<key, value>> \
--provider=aws \
--namespace=${PROJECT_CPD_INSTANCE} \
--log-level=debug \
--verbose