Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Administration Guide


B.1 Backup and recovery when the system log is not used

If an error occurs, backup files created at a predetermined time (when JP1/AJS3 stops) are used to restore the database. No system logs are used.

Organization of this subsection

(1) When backup files are created

If an error occurs in a JP1/AJS3 environment, you must synchronize the JP1/AJS3 environment and the scheduler database environment during the restore processing. If you are able to stop JP1/AJS3 operation to do this, in addition to the JP1/AJS3 backup file that is created, execute the ajsembdbbackup command to create a backup file of the scheduler database. After the backup files have been created, you can use any method to delete older backup files.

The following figure shows the timing for creating backup files.

Figure B‒1: Timing for creating backup files (when the system log not used)

[Figure]

(2) Managing backup files

You need to save backup files because they are needed to restore the database. When new backup files are created, previous backup files are no longer required. Delete them if appropriate.

(3) Procedure for creating a backup file

To create a backup file:

  1. Stop the scheduler service that uses the target scheduler database, and stop all JP1/AJS3 services that access the scheduler database.

  2. Start the embedded database.

    • In Windows:

      Confirm that the target JP1/AJS3 Database _JFn service (where n is a value from 0 to 9, or A to Z) is running. If the target service is not running, start it. Next, execute the ajsembdbstatus command with the -s ust -id _JFn option (where n is a value from 0 to 9, or A to Z) specified and confirm that the embedded database is running (that is, UNIT-STAT indicates ONLINE). If the embedded database is not running, execute the ajsembdbstart command with the -id _JFn option specified.

    • In UNIX:

      Execute the ajsembdbstart command with the -id _JFn option (where n is a value from 0 to 9, or A to Z) specified. Then execute the ajsembdbstatus command with the -s ust -id _JFn option (where n is a value from 0 to 9, or A to Z) specified and confirm that the embedded database is running (that is, UNIT-STAT indicates ONLINE).

  3. Execute the ajsembdbbackup command to create a backup file.

    Do not specify the -s option in the ajsembdbbackup command.

  4. Execute the ajsembdbstop command to stop the embedded database.

  5. Start the services you stopped in step 1, and resume normal operation.

For details about the ajsembdbbackup command, see ajsembdbbackup in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Note that if you attempt to create a backup file while the scheduler service is running or when the scheduler database is being referenced or updated, the ajsembdbbackup command might result in an error.

(4) Procedures for restoring the database if an error occurs

The following describes the procedures for restoring the database by type of error.

For details about the ajsembdbbackup and ajsembdbrstr commands used to restore the database, see 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference. For details about the ajsembdbbuild, ajsembdbsetup, and ajsembdbunset commands, see 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

(a) Procedure when a disk error occurred in the data area

The following describes the procedure for restoring the database when a disk error has occurred in the data area.

When you restore the database in a cluster environment, perform the procedure below in an environment in which the primary node has been set up. Do not perform the procedure on the secondary node.

To restore the database:

  1. On the physical host and all logical hosts, stop all JP1/AJS3 services that access the scheduler database.

  2. Execute the ajsembdbunset command to delete the database environment.

    Specify the -e option in the ajsembdbunset command.

  3. Correct the error.

  4. Execute the ajsembdbbuild command to re-create the database environment.

    When executing the ajsembdbbuild command, make sure that you specify the same information in it that was specified to create the database environment before the error occurred. If the specified information is different, an error occurs during the restore processing for the scheduler database and the database cannot be restored.

  5. Execute the ajsembdbsetup command to set up the scheduler database.

    When executing the ajsembdbsetup command, make sure that you specify the same information in it that was specified for migration to the embedded database before the error occurred. If the specified information is different, an error occurs during the restore processing for the scheduler database and the database cannot be restored.

  6. Execute the ajsembdbstop command to stop the embedded database.

  7. Execute the ajsembdbstart command with the -r option specified to start the embedded database in the mode for restoring system areas.

  8. Execute the ajsembdbrstr command with the -M option specified to restore the embedded database system area.

  9. Execute the ajsembdbstop command to stop the embedded database.

  10. Execute the ajsembdbstart command to start the embedded database.

  11. Execute the ajsembdbrstr command to restore the scheduler database.

    Do not specify the -ld and -l options in the ajsembdbrstr command.

  12. Execute the ajsembdbbackup command.

    Execute the ajsembdbbackup command to create a backup file.

  13. Execute the ajsembdbstop command to stop the embedded database.

  14. Start the services you stopped in step 1.

(b) Procedure when a disk error occurred in the system log file for the database

If an error occurred in the system log file for the database, you need to re-create the database as described in (a) Procedure when a disk error occurred in the data area. For details, see (a).

(c) Procedure when errors occurred simultaneously in JP1/AJS3 and the database

Below is the procedure for restoring the database when simultaneous errors have occurred in JP1/AJS3 and the database.

When you restore the database in a cluster environment, perform the procedure below in an environment in which the primary node has been set up. Do not perform the procedure on the secondary node.

To restore the database:

  1. Correct the errors.

  2. Recover JP1/AJS3 from the backup file.

    For details about how to recover JP1/AJS3, see 2. Backup and Recovery.

  3. Stop the scheduler service that uses the target scheduler database, and stop all JP1/AJS3 services that access the scheduler database.

  4. Start the embedded database.

    • In Windows:

      Confirm that the target JP1/AJS3 Database _JFn service (where n is a value from 0 to 9, or A to Z) is running. If the target service is not running, start it. Next, execute the ajsembdbstatus command with the -s ust -id _JFn option (where n is a value from 0 to 9, or A to Z) specified and confirm that the embedded database is running (that is, UNIT-STAT indicates ONLINE). If the embedded database is not running, execute the ajsembdbstart command with the -id _JFn option specified.

    • In UNIX:

      Execute the ajsembdbstart command with the -id _JFn option (where n is a value from 0 to 9, or A to Z) specified. Then execute the ajsembdbstatus command with the -s ust -id _JFn option (where n is a value from 0 to 9, or A to Z) specified and confirm that the embedded database is running (that is, UNIT-STAT indicates ONLINE).

  5. Execute the ajsembdbstop command to stop the embedded database.

  6. Execute the ajsembdbstart command with the -r option specified to start the embedded database in the mode for restoring system areas.

  7. Execute the ajsembdbrstr command with the -M option specified to restore the embedded database system area.

  8. Execute the ajsembdbstop command to stop the embedded database.

  9. Execute the ajsembdbstart command to start the embedded database.

  10. Execute the ajsembdbrstr command to restore the scheduler database.

    Do not specify the -ld or -l option in the ajsembdbrstr command.

  11. Execute the ajsembdbstop command to stop the embedded database.

  12. Start the services you stopped in step 3.

    If necessary, cold-start the JP1/AJS3 services.

When this procedure has been completed, you can restore the database to the state existing at the time the backup file was created in synchronization with JP1/AJS3.

(d) Procedure when a disk error occurred in JP1/AJS3

Use the procedure in (c) Procedure when errors occurred simultaneously in JP1/AJS3 and the database to restore the database.