backup-restore quiesce

Important: IBM Cloud Pak® for Data Version 4.8 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.8 reaches end of support. For more information, see Upgrading from IBM Cloud Pak for Data Version 4.8 to IBM Software Hub Version 5.1.

Quiesce Kubernetes workloads such as deployments, StatefulSets, cronjobs, jobs, and pods.

Extended description

The quiesce command suspends write operations in application workloads to ensure that backups or other maintenance activities can run. The backup-restore utility can scale-down application Kubernetes resources, or call hooks that are provided by Cloud Pak for Data services to run the quiesce. Cloud Pak for Data provided quiesce hooks might offer optimizations or other enhancements when compared to scaling-down all namespace resources. Micro services can be quiesced in a certain order, or services can be suspended without bringing down pods.

Syntax

cpd-cli backup-restore quiesce \
[--aux-service-image-prefix=<quiesce-hook-image-prefix>] \
[--dry-run=true|false] \
[--force] \
[--ignore-hooks] \
[--image-prefix=<image-registry-prefix>] \
[--log-level=info|debug|warn|error|panic] \
[--namespace=<namespace-name>] \
[--values=<yaml-file-name1,yaml-file-name2,...>] \
[--verbose] \
[--wait-timeout=<h,m,s>]

Arguments

The quiesce command has no arguments.

Options

Option Description
--aux-service-image-prefix The quiesce hook job image prefix (if configurable).
Status
Optional.
Syntax
--aux-service-image-prefix=<quiesce-hook-image-prefix>
Default value
icr.io/cpopen/cpd
Valid values
  • icr.io/cpopen/cpd
  • ${PRIVATE_REGISTRY_LOCATION}
--dry-run Executes a dry-run without running the command.
Status
Optional.
Syntax
--dry-run=true|false
Default value
false
Valid values
false
A dry run is not executed before running the command.
true
A dry run is executed before running the command.
--force Force a scale down of remaining, managed k8s resources.
Status
Optional.
Syntax
--force
Default value
No default.
Valid values
Not applicable.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--ignore-hooks Quiesce through scale down.
Status
Optional.
Syntax
--ignore-hooks
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
icr.io/cpopen/cpd
Valid values
  • icr.io/cpopen/cpd
  • ${PRIVATE_REGISTRY_LOCATION}
--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

-n

The namespace name in which the utility should operate.
Status
Optional.
Syntax
--namespace=<namespace-name>
Default value
${PROJECT_CPD_INST_OPERANDS}
Valid values
A valid project (namespace) name.

--values

-r

Specify values in one or more YAML files.
Status
Optional.
Syntax
--values=<yaml-file-name1,yaml-file-name2,...>
Default value
No default.
Valid values
One or more YAML file names.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.
--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
6m0s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m

Table 1: Command options

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 Best practice: Setting up installation environment variables.

The quiesce command (with the default options) and volume-backup (with the --skip-quiesce option) can be used when the application storage provider does not enforce ReadWriteOnce volume access (such as on NFS). For storage providers that enforce RWO (such as Portworx), quiesce should be called with the --force option, which scales down resources so the backup pod can mount volumes to conduct file copying.

Quiesce and volume-backup on NFS
Quiesce deployments and StatefulSets for the ${PROJECT_CPD_INST_OPERANDS} namespace (calls quiesce hooks or scales down resources).
cpd-cli backup-restore quiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}
Initialize cpdbr.
cpd-cli backup-restore init \
--namespace=${PROJECT_CPD_INST_OPERANDS} \
--pvc-name=demo-nfs-pvc \
--image-prefix=icr.io/cpopen/cpd \
--log-level=debug \
--verbose \
--provider=local
Volume backup.
cpd-cli backup-restore volume-backup create \
--namespace=${PROJECT_CPD_INST_OPERANDS} <myid> \
--skip-quiesce=true \
--log-level=debug \
--verbose
Unquiesce deployments and StatefulSets for the ${PROJECT_CPD_INST_OPERANDS} namespace (calls unquiesce hooks or scales up resources).
cpd-cli backup-restore unquiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}
Quiesce and volume-restore on NFS
Quiesce deployments and StatefulSets for the ${PROJECT_CPD_INST_OPERANDS} namespace (calls quiesce hooks or scales down resources).
cpd-cli backup-restore quiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}
Initialize cpdbr.
cpd-cli backup-restore init \
--namespace=${PROJECT_CPD_INST_OPERANDS} \
--pvc-name=demo-nfs-pvc \
--image-prefix=icr.io/cpopen/cpd \
--log-level=debug \
--verbose \
--provider=local
Volume restore.
cpd-cli backup-restore volume-restore \
--from-backup=<myid> \
--namespace=${PROJECT_CPD_INST_OPERANDS} <myid> \
--skip-quiesce=true \
--log-level=debug \
--verbose
Unquiesce deployments and StatefulSets for the ${PROJECT_CPD_INST_OPERANDS} namespace (calls unquiesce hooks or scales up resources).
cpd-cli backup-restore unquiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}