# Restoring a DB2 Database Out of Place

You can browse backed up data to run an out-of-place DB2 database restore operation. You can redirect table spaces and storage groups during the database restore operation.

## Before You Begin

You must drop the destination database and cleanup the Commvault archive and retrieve paths.

## Procedure

1. From the Command Center navigation pane, go to Protect > Databases.

   The Overview page appears.

2. On the Instances tab, in the row for the database instance to restore, click the Action button , and then click Restore.

   Alternatively, click the instance, and in the Recovery points tiles, select Restore option.

   The Backup content page appears.

3. Select the databases to restore, and then click Restore.

   The Restore options dialog box appears.

4. Select Out of place option.

5. From the Restore type list, you can select the following options:

   1. Cross Instance Restore

   2. Restore to Disk

6. If you select Cross instance restore, do the following:

   1. From the Destination server list, select a destination server where you want to restore.

   2. From the Destination instance list, select a destination instance.

   3. In the Target database name box, enter a name for the restored database.

   4. To define the path for the target database, in the Target database path box, enter the full path to the location of the target database.

   5. Click Redirect to redirect table spaces for a non-automatic database or to redirect storage groups for an automatic or mixed database.

      The Redirect path options dialog box appears. Complete the steps for the type of redirect operation you want:

      1. To redirect all table spaces, on the Tablespaces tab click Redirect all tablespaces, and then in the box enter the full path for the location of the table spaces.

      2. To redirect only some table spaces and containers, click Tablespaces and containers.

      3. To redirect storage groups, on the Storage groups tab expand a storage group name, and then in the Paths text boxes change the paths to the new locations for the storage group.

      4. Click Save.

   6. Select Restore database checkbox to restore the database.

   7. Select the Roll forward checkbox to roll forward the logs as part of the restore operation.

      - To roll forward to the end of all the logs, click To end of the logs.

      - To roll forward to a point in time, click Point in time, and then enter the point in time.

      - To end of backup, select To End of Backup.

        If you don't roll forward the logs the target database will be in the "rollforward pending" state after the restore.

   8. Select the date and time of restore.

   9. To reapply and restore the logs to an alternate log path, select the Alternate Log Path check box, and then enter the name of the directory in the box.

      If you enter only the alternate log path, the Commvault software restores all the logs to this location and the location becomes the NEWLOGPATH in the destination DB2 database.

      Note

      If you set both the overflow directory and the alternate log path, the Commvault software restores the logs to the overflow directory and sets the alternate log path as the NEWLOGPATH parameter in the destination DB2 database.

   10. To restore the logs that are in the overflow directory, in the Overflow Directory box, enter the name of the directory.

       If you enter only the overflow directory path, the Commvault software restores all the logs to this location and does not set the OVERFLOWLOGPATH parameter in the database that you restored.

7. If you select Restore to disk, do the following:

   1. From the Destination Client list, select the destination server for the restore.

   2. Select the time duration using the From time and to time calender.

   3. From the Job(s) list, select an existing job to restore.

   4. In the Destination folder, enter the destination folder path.

   5. Move the Impersonate user toggle key to right to use a different account that is configured for the DB2 instance.

8. You can proceed the restore without Advance option.

9. If you move the Advanced options toggle key to right, proceed as follows:

   1. Select Restore to non-encrypted database checkbox to restore the database to a non-encrypted database.

   2. Select the Restore logs checkbox, and then specify the time period of the logs to restore.

   3. Select the Restore logs from backup image (use LOGTARGET) checkbox to restore logs from backup image.

   4. From the MediaAgent list, select a media agent server name.

10. Under Pre or Post options, do the following:

    - In the Pre recovery command box, enter the name or path of the process to run before the restore.

    - In the Post recovery command box, enter the name or path of the process to run after the restore.

    - If you want to initiate the restore as user, move the Run as User toggle key to right.

      - In the User name box, enter a user name you want to run the restore with.

11. Select the Notify user on job completion checkbox to send a notification email when the restore job is completed.

12. You can configure a schedule to repeat this restore operation. To create a schedule, do the following:

    1. Click Schedule.

       The Add schedule dialog box appears.

    2. In the Name box, type a name for the schedule.

    3. Configure the Frequency and Repeat parameters.

    4. To specify exceptions to the schedule, click Exceptions.

       The Exceptions dialog box appears.

    5. Configure the exception parameters:

       - You can click Add Exception to save a set of exception parameters and continue adding sets of exception parameters.

       - Click Save when you have finished configuring the exception parameters.

    6. Under the Range of recurrence section, specify the Start date and End date to schedule the recurrence range of the restore operation.

    7. To save the schedule and return to the restore dialog box, click Schedule.

13. Click Submit.

## Related Topic

Viewing and Editing Database Restore Schedule.

×

Loading...