Top
Symfoware Server V12.1.0 Operation Guide
FUJITSU Software

8.2.2 Using the pgx_rcvall Command

Recover the database cluster by specifying in the pgx_rcvall command the date and time of the backup you want to read from. Then re-execute the transaction as required to recover the data.

Follow the procedure below to recover the data storage disk.

  1. Stop applications

    Stop applications that are using the database.

  2. Stop the instance

    Stop the instance. Refer to "2.1.2 Using Commands" for information on how to stop an instance.

    If the instance fails to stop, refer to "8.11 Actions in Response to Failure to Stop an Instance".

  3. Confirm the backup date and time

    Pinpoint a date and time prior to the data corruption based on the content of the job log or event log.

  4. Recover the keystore, and enable automatic opening of the keystore

    When the data in the database has been encrypted, restore the keystore to its state at the time of the database backup. Configure automatic opening of the keystore as necessary.

  5. Recover the database cluster

    Use the pgx_rcvall command to recover the database cluster.

    Specify the following values in the pg_rcvall command:

    • Specify the data storage destination in the -D option. If the -D option is omitted, the value of the PGDATA environment variable is used by default.

    • Specify the backup storage directory in the -B option.

    • Specify the recovery date and time in the -e option.

    Example

    In the following examples, "July 20, 2013 10:00:00" is specified as the recovery time.

    > pgx_rcvall -D D:\database\inst1 -B E:\backup\inst1 -e "2013-07-20 10:00:00"

    Note

    If recovery fails, remove the cause of the error in accordance with the displayed error message and then re-execute the pgx_rcvall command.

    If the message "pgx_rcvall: an error occurred during recovery" is displayed, then the log recorded when recovery was executed is output after this message. The cause of the error is output in around the last fifteen lines of the log, so remove the cause of the error in accordance with the message and then re-execute the pgx_rcvall command.

    The following message displayed during recovery is output as part of normal operation of pgx_rcvall command (therefore the user does not need not be concerned).

    FATAL: The database system is starting
  6. Start the instance

    Start the instance. Refer to "2.1.2 Using Commands" for information on how to start an instance.

    If necessary, re-execute transaction processing from the specified recovery time, and then resume database operations.

    Note

    The pgx_rcvall command cannot accurately recover a hash index. If you are using a hash index, wait for the instance to start and then execute the REINDEX command for the appropriate index.

  7. Resume applications

    Resume applications that are using the database.

See

Refer to "pgx_rcvall" in the Reference for information on the pgx_rcvall command.