3.5.3 Backup and recovery (in UNIX)
- Organization of this subsection
(1) Backing up JP1/Base setup information
JP1/Base setup information includes:
-
Definition files
-
Common definition information
-
jp1hosts2 information
In a cluster system, back up physical hosts, and then logical hosts, for each environment.
(a) Definition files
The following table lists the definition files that users set in JP1/Base. You need to back up these files. You can use the tar or cpi command, or a more advanced backup command to back up these files. Choose any backup method.
(b) Common definition information
In JP1/Base, you must back up common definition information as well as the definition files. This information includes common definition information for JP1/Base, JP1/IM, and JP1/AJS.
To back up the common definition file, execute the following command:
jbsgetcnf > backup-file
When you run JP1/Base in a cluster system, execute the following command:
jbsgetcnf -h logical-host-name > backup-file
Note that the logical host name must be correctly specified with lower or upper case as specified when the logical host was set up.
(c) Backing up jp1hosts2 information
Execute the following command to back up jp1hosts2 information defined in your system.
jbshosts2export > backup-file
If you defined jp1hosts2 information for a logical host, execute the command as follows:
jbshosts2export -h logical-host-name > backup-file
For a logical host in a cluster configuration, execute the command on the primary node.
(2) Backing up an event database
There are two modes of backing up event database files:
-
Backup for data recovery
-
Backup for error reporting
(a) Backup for data recovery
To back up the event database files:
-
Stop all services that use JP1/Base.
-
Stop JP1/Base.
-
Copy or otherwise back up the event database files.
Back up the following files:
/var/opt/jp1base/sys/event/servers/default/IMEvent*.*#
or
shared-directory/event/IMEvent*.*#
#: If a different path is specified in the event server index file (index) as the directory to be used by the event server, back up the files in that path.
-
Start JP1/Base.
-
Restart the services that use JP1/Base.
(b) Backup for error reporting
To back up an event database for error reporting purposes, use the jevexport command to output the database contents to a CSV-format file.
Each event server has two event databases. When one database reaches the maximum size (10 megabytes by default), the other event database is swapped in. The existing contents of the swapped-in database are erased. You should regularly check how large the event database has become, and execute the jevexport command before the event databases are swapped over.
(3) Recovering JP1/Base setup information
The following describes recovery for JP1/Base. In a cluster system, recover the physical hosts, and then the logical hosts for each environment.
(a) Recovering definition files
To recover the definition files, restore the backup files in the original locations. Make sure that the following conditions are satisfied before you start:
-
JP1/Base is successfully installed, and the setup command has been executed.
-
JP1/Base is stopped.
-
JP1/Base in the logical host environment is set up (for a logical host).
-
The shared disk is online (for a logical host).
(b) Recovering the common definition information
To recover common definition information, you also need to restore the backup of common definition information in addition to the definition files described above.
Execute the following command:
jbssetcnf backup-file-name
For backup-file-name, specify the backup file generated by the jbsgetcnf command.
(c) Recovering jp1hosts2 information
Execute the following command to recover jp1hosts2 information backed up using the procedure in (1)(c) Backing up jp1hosts2 information:
jbshosts2import -r name-of-backup-file-backed-up-in-section-(1)-(c)
If you backed up jp1hosts2 information for a logical host, execute the command as follows:
jbshosts2import -h logical-host-name -r name-of-backup-file-backed-up-in-section-(1)-(c)
For a logical host in a cluster environment, execute the command on the primary node.
(4) Recovering an event database
When you recover the event database from a backup, the highest serial number in the database will be the highest number at the time backup was taken.
Event servers that receive forwarded JP1 events (typically environments where JP1/IM Manager is installed) keep a record of the highest serial number in the event database from which the event was forwarded. The event server uses this information as the basis for a duplication registration check. As long as the serial number of a new JP1 event is greater than the highest on record, the event server considers the event to be original and registers it without conducting any further checks. However, if a lower serial number is reported, the event server searches the database for the same JP1 event to rule out the possibility that the forwarded event is a duplicate. A larger event database means more information to search, which can cause delays when forwarding events and in features that use the event service.
(a) When the forwarding settings file is not configured to forward JP1 events to other hosts
-
Stop all products that use JP1/Base.
-
Stop JP1/Base.
-
Move the backed-up files.
Move the files to the following directory:
/var/opt/jp1base/sys/event/servers/default/#
or
shared-directory/event/#
#: If you specified a different location to be used by the event server in the event server index file (index), place the files in that location.
-
Start JP1/Base.
-
Start the products that use JP1/Base.
(b) When the forwarding settings file is configured to forward JP1 events to other hosts
Use one of the following procedures to recover the event database:
-
Initialize the event database.
Initialize the event database as described in 10.2.2 Initializing an event database while the event service is stopped. You can view the contents of a backed-up event database by using the jevexport command to output them to a CSV file.
-
Disable duplication registration checking on the event servers specified as forwarding destinations in the forwarding settings file.
Perform the following tasks on the forwarding destination:
-
Stop all products that use JP1/Base.
-
Stop JP1/Base.
-
Add the following line to the event server settings file (conf):
repetition-noncheck-server event-server-to-be-recovered
-
Start JP1/Base.
-
Start the products that use JP1/Base.
- Perform the following task on the forwarding source:
-
Recover the database by following the procedure in (a) When the forwarding settings file is not configured to forward JP1 events to other hosts above.
When the forwarding target first receives a forwarded JP1 event, the event service resets the highest serial number recorded for the forwarding source. You can then re-enable duplication registration checking on the destination event server if you choose.
-