Skip to main content

PowerProtect Database Application Agent 19.13 Installation and Administration Guide

Performing Storage Direct restores with the DB2 CLP

You can run the db2 restore use snapshot library command with the appropriate options to perform a Storage Direct DB2 restore to either the same DB2 application host or a different host.

A Storage Direct DB2 restore can restore a Storage Direct backup to the original database.

If you are recovering the data to a point-in-time, note the timestamp of the backup to restore.

DB2 snapshot restores do not support incremental level, tablespace level, or other types of restores. The DB2 documentation provides details about all the unsupported options for snapshot restores.

Before you perform any restores, ensure that you meet the following requirements:

  • The numeric user ID (UID) and group ID (GID) of the target database/instance owner matches the original UID and GID captured during the Storage Direct backup.

    A Storage Direct backup is associated with the original database/instance owner. During the restore of the Storage Direct backup, the UID and GID of the target database/instance owner must match the original UID and GID. Otherwise, the restore fails because the database/instance owner does not have the permission to access the database objects after they are restored.

  • All the file system mount points in the backup are re-created with the proper ownership and permissions.

    A Storage Direct restore does not restore the ownership and permissions of the mount points and the file system directories above them.

  • If the database contains symbolic links, then the symbolic links are re-created before you perform a restore.

    A Storage Direct backup does not back up symbolic links.

Perform a Storage Direct restore by running the db2 restore use snapshot library command. For example, run the following command on UNIX:

db2 restore db <sample> use snapshot library /opt/dpsapps/dbappagent/lib/lib64/libddboostdb2.so options '@<pathname>/db2_ddbda.cfg' taken at <yyyymmddhhmmss> logtarget include force

where:

  • <sample> is the name of the database to be restored.
  • <pathname>/db2_ddbda.cfg is the pathname of the DB2 configuration file.
  • <yyyymmddhhmmss> is the timestamp of the backup to restore.

Skip the taken at parameter if you restore only the most recent backup of the database.

If the timestamp of the backup is unknown, you can run the db2acsutil query command to find the timestamp. For example:

db2acsutil LOAD /opt/dpsapps/dbappagent/lib/lib64/libddboostdb2.so options '@<pathname>/db2_ddbda.cfg' query snapshot db <sample>

where:

  • <pathname>/db2_ddbda.cfg is the full pathname of the configuration file.
  • <sample> is the name of the database to be restored.

Querying Storage Direct DB2 backups provides more details.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\