Backing up Db2 with the cpd-cli backup-restore command

You can use the cpd-cli backup-restore command-line interface to back up your Db2 persistent volumes.

For more information, see Backing up volumes.

Db2 supports the following cpd-cli backup-restore commands.
backup-restore quiesce
Scales Db2 down to 0.
For example:
cpd-cli backup-restore quiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}
backup-restore unquiesce
Scales Db2 up to the original replica count.
For example:
cpd-cli backup-restore unquiesce \
--namespace=${PROJECT_CPD_INST_OPERANDS}
backup-restore volume-backup create
Creates a backup of a volume.
For example:
cpd-cli backup-restore volume-backup create <${PROJECT_CPD_INST_OPERANDS}-backup-name> \
--namespace=${PROJECT_CPD_INST_OPERANDS}
backup-restore snapshot create
Creates a snapshot of a volume.
For example:
cpd-cli backup-restore snapshot create <volume-snapshot-name> \
--namespace=${PROJECT_CPD_INST_OPERANDS}
Note: Deployments that use the zen-databases and zen-databases-core pods might return an error during quiesce, but you can ignore the error. The pods might continue to run and be in a Not Ready state after a quiesce, but this state does not affect volume backup or restore because the pods do not use any volumes.