IBM® Db2 Warehouse backup and restore with an IBM Spectrum Scale snapshot (MPP)

This topic provides sample procedures for performing snapshot backup and restore operations by using IBM Spectrum Scale (formerly, GPFS) version 4.1.1.4. To complete the procedures, you require root authority. For more information, see the snapshot and restore using IBM Spectrum Scale video.
  • Taking a snapshot backup
    1. From the head node, suspend the database by issuing the following Docker or Podman command:
      docker exec -it Db2wh write-suspend
      podman exec -it Db2wh write-suspend
      Suspending I/O ensures a consistent database.
    2. Take a global snapshot by issuing the mmcrsnapshot command with the file system name and snapshot name. In the following example, clusterfs is the file system name, and bludata0snap is the snapshot name. If you are unsure of the file system name, you can get it by using the mmlsmount all command.
      mmcrsnapshot clusterfs bludata0snap
    3. From the head node, take the database out of write-suspend state by issuing the following Docker or Podman command:
      docker exec -it Db2wh write-resume 
      podman exec -it Db2wh write-resume 
  • Restoring from a snapshot backup
    1. On the head node, stop the Db2® Warehouse services by issuing the following Docker or Podman command:
      docker exec –it Db2wh stop
      podman exec –it Db2wh stop
    2. On all of the nodes, stop the Db2 Warehouse container by issuing the following Docker or Podman command:
      docker stop Db2wh
      podman stop Db2wh
    3. Ensure that no user processes are active on the file system. If user operations are active, the restore might fail.
    4. Restore the file system from the snapshot by issuing the mmrestorefs command with the device and snapshot names. If you are unsure of the snapshot name, you can get it by using the mmlssnapshotdevice_name command.
      mmrestorefs clusterfs bludata0snap
    5. On all of the nodes, start the Db2 Warehouse container by issuing the following Docker or Podman command:
      docker start Db2wh
      podman start Db2wh