Restoring a Database

You can use the database restore utility to restore backups, held on disks or tape, made with the database backup utilities, DBBACKUP and DYNABACK. This utility also allows you to apply transaction logs to the database for roll-forward recovery.

  1. Make sure you have the disks that contain the database backup

  2. On the Database Backup/Recovery & Check menu, select the Restore option. The Restore and Recovery utility screen is displayed. Select the database

  3. If you are restoring a database that is not already on the system, the Restore Database menu is displayed:

    If the database is already on the system, DP4 displays the Restore Database menu with transaction log options:

  4. Select option 1 - Restore database from backup disks.

  5. You are asked whether you want to verify the database to be restored:

    Answer 'Yes' to make sure the database is written to disk properly. Answer 'No' to skip the database verification. Answer 'Abort' to return to the previous menu.

  6. Load the first backup disk, as requested, and press <Enter>. DP4 locates the database on disk and displays the database information:

    Backup of session 4 made on 21 May 1998

    Comment SALESORD, Session 4, 21/05/98.

  7. Confirm that you have the right backup. If you do, press <Enter> to continue with this disk. If you do not, answer 'No' and try another disk.

  8. If the database already exists on your system, you are asked whether you want to replace it:

    Answer 'Yes' to restore the database. Answer 'No' to return to the previous menu

  9. If the database is stored on more than one disk, DP4 prompts you to enter each disk in turn.

  10. The Transaction Log Recovery menu is displayed:

    If the backup was made in the standard way with DBBACKUP, select option 1 - Transaction log recovery. You are prompted to insert the transaction log disk for a specific session number:

    Load the appropriate disk and press <Enter>
    If the backup was made using DYNABACK, select option 3 - Extract log from dynamic backup.

    You are prompted to insert the disk containing the dynamic backup. Load the appropriate disk and press <Enter>

    If you have mislaid the transaction log that DP4 requests, but have others that you wish to apply, refer to Restoring Out-of-Sequence Logs.

  11. Once the transaction log is applied, you are returned to the Transaction Log menu. If you have further logs to update the database with and they are in sequence, use option 1 - Transaction Log Recovery or option 3 - Extract log from dynamic backup to apply each of them in turn. The last log that you must apply is the current log:

After restoring a database it is recommended that you run the database integrity checking utility against it to ensure that you have a good database and complete working system.