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>] \
[--credential=<map<key,value>>] \
[--labels=<map<label,label,...>>] \
[--prefix=<prefix-name>] \
[--namespace=<namespace-name>] \
[--validation-frequency=<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 options
| Argument | Description |
|---|---|
<cpd-snapshot-name> |
The name of the backup storage location. |
Table 2: Global options arguments
| Argument | Description |
|---|---|
<trace-location> |
The stack trace location |
<severity> |
The log severity level |
Options
Table 1: Command options
| Option | Description |
|---|---|
--access-mode |
The access mode for the backup
storage location.
|
--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.
|
--bucket |
The object storage bucket name
where backups are stored.
|
--cacert |
The certificate bundle path to use
when verifying TLS connections.
|
--config |
The configuration key-value
pairs.
|
--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.
|
|
|
Display command
help.
|
--labels |
Labels to apply to the
backup storage location.
|
--prefix |
The prefix under which all data is
to be stored within the bucket.
|
--provider |
The backup storage provider name
(for example, aws, azure, gcp).
|
--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.
|
--verbose |
Logs include more detailed
messages.
|
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.
|
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 Setting up installation environment 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_INST_OPERANDS} \ --log-level=debug \ --verbose