Taking a snapshot backup with Db2 Warehouse container commands

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.

You can take a snapshot backup of your Db2 Warehouse database by using container commands to momentarily pause operators that perform writes and then taking an online snapshot.

About this task

Snapshot backups have significant advantages over traditional backups. They are completed quickly, regardless of database size, and they allow for fast recovery. Also, snapshots do not affect many database operations, except momentarily pausing operations that perform writes.

Procedure

  1. Run the following command to identify your Db2 Warehouse catalog pod:
    DB2_CAT_POD=$(oc get po -l app=${DB2_CR},name=dashmpp-head-0)
  2. Suspend operations on the catalog pod by running the following command:
    oc exec -it -- ${DB2_CAT_POD} -- manage_snapshots --action suspend
  3. Confirm that Db2 Warehouse high availability monitoring is disabled and the database is suspended by issuing the following command:
    oc exec -it ${DB2_CAT_POD} -- wvcli system status
  4. Take the snapshot of the persistent volume claim and volume claim templates at the storage layer. The steps differ depending on your storage provider. For more information about snapshot support and instructions, see your storage provider documentation.
  5. Resume writes to the database:
    oc exec -it ${DB2_CAT_POD} -- manage_snapshots --action resume
  6. Confirm that Db2 Warehouse high availability monitoring is re-enabled and the database is taken out of write suspend by issuing the following command:
    oc exec -it ${DB2_CAT_POD} -- wvcli system status

What to do next

For instructions on the recommended restore option, see Restoring from a snapshot backup with Db2 Warehouse container commands.