3.1.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.
|
(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:
-
Stop the scheduler service that uses the target scheduler database, and stop all JP1/AJS3 services that access the scheduler database.
-
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).
-
-
Execute the ajsembdbbackup command to create a backup file.
Do not specify the -s option in the ajsembdbbackup command.
-
Execute the ajsembdbstop command to stop the embedded database.
-
Start the services you stopped in step 1, and resume normal operation.
For details about the ajsembdbbackup command, see ajsembdbbackup in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
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 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1. For details about the ajsembdbbuild, ajsembdbsetup, and ajsembdbunset commands, see 2. Commands Used during Setup in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
(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:
-
On the physical host and all logical hosts, stop all JP1/AJS3 services that access the scheduler database.
-
Execute the ajsembdbunset command to delete the database environment.
Specify the -e option in the ajsembdbunset command.
-
Correct the error.
-
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.
-
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.
-
Execute the ajsembdbstop command to stop the embedded database.
-
Execute the ajsembdbstart command with the -r option specified to start the embedded database in the mode for restoring system areas.
-
Execute the ajsembdbrstr command with the -M option specified to restore the embedded database system area.
-
Execute the ajsembdbstop command to stop the embedded database.
-
Execute the ajsembdbstart command to start the embedded database.
-
Execute the ajsembdbrstr command to restore the scheduler database.
Do not specify the -ld and -l options in the ajsembdbrstr command.
-
Execute the ajsembdbbackup command.
Execute the ajsembdbbackup command to create a backup file.
-
Execute the ajsembdbstop command to stop the embedded database.
-
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:
-
Correct the errors.
-
Recover JP1/AJS3 from the backup file.
For details about how to recover JP1/AJS3, see 2. Backup and Recovery.
-
Stop the scheduler service that uses the target scheduler database, and stop all JP1/AJS3 services that access the scheduler database.
-
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).
-
-
Execute the ajsembdbstop command to stop the embedded database.
-
Execute the ajsembdbstart command with the -r option specified to start the embedded database in the mode for restoring system areas.
-
Execute the ajsembdbrstr command with the -M option specified to restore the embedded database system area.
-
Execute the ajsembdbstop command to stop the embedded database.
-
Execute the ajsembdbstart command to start the embedded database.
-
Execute the ajsembdbrstr command to restore the scheduler database.
Do not specify the -ld or -l option in the ajsembdbrstr command.
-
Execute the ajsembdbstop command to stop the embedded database.
-
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.