oadp
du-pv
Get an estimated volume usage size to allocate sufficient storage for backups.
Extended description
- Required role
- You must have the Cluster administrator role in IBM® Software Hub.
Before you run the du-pv command, the cluster administrator must install
the cpdbr-agent to the Red Hat®
OpenShift® cluster. For more information, see the
section Optional: Estimating how much storage to allocate for backups in IBM Software Hub online backup and restore to the same cluster
with the OADP utility.
You must also export the following environment variable before you run the du-pv command.
export CPDBR_ENABLE_FEATURES=volume-util
The estimated usage size that is returned by du-pv includes only PVCs that are bound and mounted by pods.
Syntax
cpd-cli oadp du-pv
# 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
| Argument | Description |
|---|---|
<trace-location> |
The stack trace location |
<severity> |
The log severity level |
Options
| Option | Description |
|---|---|
--include-namespaces |
The namespaces in which to
run du-pv exec-hooks.
|
Global options
You can also use the following global options with this command:
| 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
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.
cpd-cli oadp du-pv --include-namespaces=${PROJECT_CPD_INST_OPERANDS}
This command might return information that is similar to the following example.
PVC NAME NAMESPACE VOLUME STATUS MOUNTED CAPACITY USED CREATED AT ACCESS MODES STORAGE CLASS
export-zen-minio-0 cpd-instance pvc-45080d04-fd88-4612-8963-37c456f7be27 Bound true 10Gi 130Mi 25 May 23 11:16 PDT RWO managed-nfs-storage
export-zen-minio-1 cpd-instance pvc-4b0630d7-2ea2-4485-bdd7-c55cce26c6ec Bound true 10Gi 130Mi 25 May 23 11:16 PDT RWO managed-nfs-storage
export-zen-minio-2 cpd-instance pvc-d64ea3ae-3435-4d30-a7e7-b30eb03f5b56 Bound true 10Gi 130Mi 25 May 23 11:16 PDT RWO managed-nfs-storage
ibm-zen-cs-mongo-backup cpd-instance pvc-e1ac51ce-94ef-47d5-993c-9de48bb5d9e4 Bound false 20Gi - 25 May 23 11:44 PDT RWO managed-nfs-storage
ibm-zen-objectstore-backup-pvc cpd-instance pvc-2d1d4ab2-4e51-4701-a864-9f946eafdd83 Bound false 20Gi - 25 May 23 11:22 PDT RWO managed-nfs-storage
mongodbdir-icp-mongodb-0 cpd-instance pvc-84013df3-3b46-4432-988f-d951271d1d42 Bound true 20Gi 432Mi 25 May 23 11:38 PDT RWO managed-nfs-storage
mongodbdir-icp-mongodb-1 cpd-instance pvc-a1e509f7-ee08-48e3-b0ed-95182f3d3158 Bound true 20Gi 448Mi 25 May 23 11:40 PDT RWO managed-nfs-storage
mongodbdir-icp-mongodb-2 cpd-instance pvc-17bc7875-c203-44a9-a608-a5120b9a04cf Bound true 20Gi 444Mi 25 May 23 11:40 PDT RWO managed-nfs-storage
zen-metastore-edb-1 cpd-instance pvc-9087d25e-d54e-4823-b8a6-6a5ad6a55de7 Bound true 10Gi 588Mi 25 May 23 11:18 PDT RWO managed-nfs-storage
zen-metastore-edb-2 cpd-instance pvc-185de0d4-c6c9-4944-8a51-5e5626b34f06 Bound true 10Gi 604Mi 25 May 23 11:18 PDT RWO managed-nfs-storage
Total estimated volume usage size: 3Gi
If --include-namespaces is not specified, the du-pv command includes the zen namespace and its tethered namespaces.
To uninstall the cpdbr-agent, run the following command.
cpd-cli oadp uninstall --component=cpdbr-agent