Rebuilding and Restoring the Secondary Database
Having created a standalone primary using option 1 on the Database Recovery menu, this procedure is used to remake the failed database (old primary) before restoring the last database save tape. The remade database provides a basis for recovering full FailSafe operation as a secondary by restoring clean logs and resynchronising databases, using options 3 and 4 on the Database Recovery menu.
Note
- You do not need to carry out the procedure described in this section if the database is enabled for Rapid Recovery. Instead, you should execute the realrecover command on the old primary to run the Rapid Recovery process (see Rapid Database Recovery).
- The procedure described here must be carried out on the new primary.
- Ensure that tlmenu is configured to use the same backup method for the database you are rebuilding as was used when the backup was saved (see Backup Methods used by tlmenu).
Procedure
-
Select option 2 on the Database Recovery menu. A message is then displayed describing the purpose of the procedure and prompting you to confirm that you wish to continue.
When you enter
y
at the confirmation prompt, tlmenu checks the configuration of the remote database and whether the database is active. -
If the configuration is correct and the remote database inactive, the procedure continues by prompting to clear out the failed database. The prompt is:
WARNING: This will clear database 'database'
Are you sure you wish to clear it [Y/N] ?A warning is displayed if the configuration is incorrect or the remote database is active. If the remote database configuration is incorrect, select option 1 to verify the database configuration, then re-select this option. If the secondary database is active, then you must shut it down before re-running this option.
Enter
y
at theclear database
prompt to remake the database. This clears the inactive secondary and rebuilds an empty database, retaining the configuration parameters of the old database. - Once the database has been successfully rebuilt, you are asked if you wish to perform a remote restore in order to recover the secondary database from the last backup. Enter
y
to continue with the remote restore. -
Before continuing with the restore, you are given the option to resize files during the restore. If you select this option then the size of those files (modulo) which have previously been set up for resizing, will be changed during the restore.
For details on setting up file resizing parameters, refer to User's Reference: General. Note however that selection of this option may slow down the restore process considerably.
When you reply
y
orn
to resizing, the procedure continues according to which backup method is configured for tlmenu operation (described in Backup Methods used by tlmenu). - If the dbsave option is configured as the backup method, you are next prompted to start the restore. When you enter
y
at the prompt, a Multi-Deck Restore is executed, ending with the message described in step 8. -
If FILE-SAVE is configured as the backup method, a list of tape units configured on the database is displayed, followed by the prompt:
Enter REMOTE tape unit for Restore (tape_unit) :
Enter the number of the tape device to be used to restore the save. A message similar to the following is displayed:
Mount save tape on tape unit tape_unit
-
Next you are prompted with:
Are you ready to start the restore (y/n/q) ? :
Ensure that the most recent save tape is mounted in the specified tape device and that the device is on-line, then enter
y
. The tape is read and the tape label displayed for you to make sure that it is the correct tape. -
You are then prompted to confirm that the tape is correct.
If the correct tape is mounted, enter
y
to execute the procedure. The restore is then executed, ending with the message:Now restore the Clean Log(s) and resynchronise the databases Hit return to continue:
This returns you to the Database Recovery menu. You must now use options 3 and 4 on the Database Recovery menu to restore clean logs and resynchronise the secondary to the primary.