Restoring Db2 or Db2 Warehouse by using commands
This process restores a database that was backed up by using the db2 backup command. The restored database starts back the same state that it was in when the backup was made.
Before you begin
- You must have an existing Db2 or Db2 Warehouse backup that is accessible on the Red Hat OpenShift cluster.
- You must identify the Db2 or Db2 Warehouse catalog node and data nodes and have an SSH connection open to each node. For more information, see Preparing to back up or restore Db2 or Db2 Warehouse.
The commands in this procedure use the environment variable containing the default database name
${DBNAME}
. If you have multiple databases, please update the variable value or
commands accordingly.
About this task
The restore script is the preferred strategy to restore because it provides:
- A simple flow
- A restore strategy for full offline backup images
- Native support for restoring encrypted databases
The commands in this procedure are illustrative only and are only applicable when you are restoring from a Db2 or Db2 Warehouse backup in Red Hat OpenShift at a similar version. Further commands are required for restoring an encrypted database. For most restore operations, the best practice is to use the procedure in Using the restore script.
For a Db2 or Db2 Warehouse deployment, the db2 restore command can be started only from the catalog node, but each available multiple logical node (MLN) participates in the restore operation.