Restoring Db2 databases

With R‑Cloud, you can restore individual Db2 databases to a location of your choice on the original or a different Db2 instance.

Prerequisites

  • You must be granted the following permissions: to run the db2inidb command on the databases, to terminate the database connections, to deactivate the databases, and to perform the rollforward recovery.

  • Only if you plan to perform the complete recovery or the point-in-time restore. The Back up and truncate Db2 archive logs option must be enabled. For details, see Specifying the configuration properties for Db2 application.

Limitation

You cannot restore Db2 databases if the status of the virtual machine instance or the applications that are hosted on it is Protected deleted.

Considerations

  • If you plan to perform the point-in-time restore from the latest restore point, the Overwrite existing databases option must be enabled.

  • Only if you plan to disable the Overwrite existing databases option. When selecting multiple databases for the restore, keep in mind that you can select only the databases that share the same local database directory.

Procedure

  1. In the Applications panel, click the Db2 application whose databases you want to restore to open the Detail view.

    Note  The Detail view appears only if you click an application. Selecting the check box before the name of the application does not open the Detail view.

  2. In the Detail view that appears at the bottom of the screen, select the preferred restore point.

  3. Click Restore Files Restore.

  4. Select Restore Db2 Databases, and then click Next.

  5. From the Restore From drop-down menu, select which tier you want to use for the restore. Your restore point can contain one or more tiers among which you can select:

    • Automatic: This option ensures the fastest and most cost-effective restore.

    • Backup (Snapshot)

    • Backup (Target)

    • Copy

    • Archive—(daily, weekly, monthly, yearly)

  6. Select the Databases check box if you want to restore all available databases, or select the check boxes before each individual database to restore only the selected databases.

    Tip  You can search for a database by entering its name in the Search field and then pressing Enter.

  7. Click Next.

  8. Depending on whether you want to recover the databases or to leave the databases in the rollforward pending state after the restore, select one of the following options, click Next, and then follow the instructions:

    Option Instructions
    Recover
    1. From the Target Db2 Instance drop-down menu, select where you want to restore the databases.
    2. Only if you selected the latest restore point. Enable the Complete recovery switch if you want the databases to be restored to the latest possible state from the existing archive log files.

    3. Only if the Complete recovery option is disabled. Specify a point in time to which you want to restore the databases. The databases will be restored to the state they were in at the specified time.

    4. Only if you are restoring data to the original Db2 instance. Enable the Overwrite existing databases switch if you want to overwrite the existing databases when performing the restore. In this case, the databases will be restored to their original location and all data will be overwritten.

      If you keep this option disabled, the data will not be overwritten during the restore. In this case, specify the following:

      • New database path

      • New database name (if you are restoring a single database) or a database prefix that will be given to the databases (if you are restoring more than one database)

    Leave in Rollforward Pending State

    Enable the Overwrite existing databases switch if you want to overwrite the existing databases when performing the restore.

    If you keep this option disabled, the databases are not overwritten. In this case, specify the following:

    • New database path

    • New database name (if you are restoring a single database) or a database prefix that will be given to the databases (if you are restoring more than one database)

    Important  After leaving the databases in the rollforward pending state, you must complete the rollforward recovery for the databases. For instructions, see Db2 documentation.

  9. Click Restore.