Hitachi

Hitachi Advanced Database Setup and Operation Guide


10.3.2 Recovering the database from the backup

This section explains how to recover the database from a backup that was made.

Figure 10‒2: Procedure for recovering the database from a backup

[Figure]

  1. Terminate the HADB server.

    Before you can recover the database from a backup, you need to terminate the HADB server. Execute the following command to terminate the HADB server:

    adbstop
    Important
    • Before you recover the database from a backup, you must terminate the HADB server. If the database is recovered from a backup while the HADB server is running, database compatibility can no longer be maintained, and the validity of subsequent operations of the HADB server cannot be guaranteed.

    • Even when the HADB server's termination mode is abnormal termination or forced termination, it can be recovered from a backup as long as the HADB server terminated.

  2. Recover the database from the backup.

    Recover the database from the backup that was made. Store under the target directory all files acquired in step 5. Back up the database in (2) Backup procedure under 10.3.1 Backup acquisition method.

    If the files to be restored include symbolic link files, you must also recover the target files and block special files. Do not use sparse files as files to be restored.

    Important
    • When you recover the database from a backup, be sure to re-store all files that were backed up. If you re-store only some of the files, database compatibility cannot be achieved and the validity of subsequent operations cannot be guaranteed.

      When recovering the database from a backup, store only the files that were backed up. If the files under the target directory are overwritten with files that were not backed up, database compatibility cannot be achieved and the validity of subsequent operations cannot be guaranteed.

    • If a block special file is specified for the work table DB area, first restore the DB area. Next, specify the adb_blk_path_wrk operand in the server definition, and then start the HADB server. For details about the adb_blk_path_wrk operand in the server definition, see the description of the adb_blk_path_wrk operand in 7.2.1 Operands related to system configuration (set format).

  3. Start the HADB server.

    Once you have recovered the database from the backup that was made, start the HADB server. Execute the following command to start the HADB server:

    adbstart
  4. Check the HADB server's status.

    After you have started the HADB server, check whether the HADB server's operation mode is the normal mode. Execute the following command to check the HADB server's status:

    adbls -d srv

    Check the item STATUS in the execution result. If STATUS is ACTIVE, the operation mode is set to the normal mode. If STATUS is QUIESCE, the operation mode is set to the quiescence mode. Execute the adbchgsrvmode --normal command to change the operation mode to the normal mode.

To recover the server directory or client directory after a problem such as a disk error has occurred, see 15.4.2 Recovering the server directory or 15.4.3 Recovering the client directory.