Recreating a Standby DB2 Database Using Commvault Backups

You can create a standby database using Commvault backups. If you restore the DB2 standby database using a Commvault backup, you need to reconfigure HADR.

Note: The destination target database path (Restore Options dialog box, General tab, Target Database path) and the destination storage path (Advanced Restore Options dialog box, Storage Path tab, Paths) must match the values that you used on the source.

Before You Begin

Configure the standby database to be in roll-forward pending state.

Procedure

  1. On the standby database server client, add an instance.

  2. From the CommCell Browser, navigate to Client Computers > client > DB2 > instance.

  3. Right-click the backup_set, point to All Tasks and then click Browse and Restore.

    The Browse and Restore dialog box appears.

  4. On the Time Range tab, select Latest Backup and click View Content.

  5. Select the databases to restore and click Recover All Selected.

    The Restore Options dialog box appears.

  6. On the Recover Database tab, clear the Recover DB check box.

  7. On the Restore Arguments tab, in the Backup Images area, choose an option for selecting backup images:

    • To let the Commvault software select the latest backup images or the latest point-in-time backup images, based on the choice you made on the Time Range tab on the Browse and Restore dialog box, choose Auto Pick Backup Images.

    • To manually select a cycle of backup images, choose Select Backup Images. Select the images from the Available Images box, and then click > to move the selected images to the Selection box.

  8. On the General tab, specify the destination information.

    1. From the Destination Computer list, select the standby database server client.

    2. From the Destination Instance list, select the standby database instance name.

    3. In the Target Database Name box, type the standby database name.

    4. In the Target Database path, type the location of the standby database.

  9. Click Advanced.

    The Advanced Restore Options dialog box is displayed.

  10. In the Roll-Forward tab, select the Leave in Roll-forward Pending State checkbox.

  11. Specify the storage path if you have an automatic database, or the redirect information if you have a non-automatic database:

  12. Database Type

    Procedure

    Automatic or Mixed Databases

    Note

    DB2 storage paths are displayed only if there are GUI backup jobs that have run for this database. You won't see storage paths displayed for third-party command line backup jobs.

    To specify the storage path, on the Storage Paths tab:

    1. Select the Redirect storage groups check box.

      The DB2 storage groups appear.

    2. From the Storage group box, select the DB2 storage group to view the existing path on the source database.

    3. In the Path box, select the path on the DB2 storage device.

      • To change a path for this storage group, click it, then click Edit. Type the changes to the path.

      • To add a path for this storage group, click Add, and then type the path.

    Non-Automatic Databases

    On the Redirect tab:

    1. Select the Redirect All Table Spaces/Database to check box

    2. Enter the path to redirect the tablespaces and database.

      Note

      The path must contain 'SQL0001.

  13. Click OK to close the Advanced Restore Options dialog box.

  14. Click OK to close the Restore Options dialog box.

  15. After the restore operation is completed, go to the IBM DB2 help website and follow the instructions to configure HADR on both the primary and standby databases.

    For information on how to configure the primary server, go to the IBM DB2 help website, Configuring the HADR primary server.

    For information on how to configure the standby server, go to the IBM DB2 help website, Configuring the HADR standby server.

    You must configure the following database parameters:

    • Local IP Address (HADR_LOCAL_HOST)

    • Local Service Name/Port (HADR_LOCAL_SVC)

    • Remote IP Address (HADR_REMOTE_HOST)

    • Remote Service Name/Port (HADR_REMOTE_SVC)

    • Remote DB2 Instance Name (HADR_REMOTE_INST)

    • Synchronization Mode (HADR_SYNCMODE)

  16. Use the DB2 command line interface to start HADR on the standby database.

    Substitute the standby_database_name parameter with the name of your standby database.

    db2 start HADR ON DB standby_database_name as standby
  17. Use the DB2 command line interface to start HADR on the primary database.

    Substitute the primary_database_name parameter with the name of your standby database.

    db2 start HADR ON DB primary_database_name as primary
×

Loading...