Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


ajsembdbrstr

Organization of this page

Format

ajsembdbrstr
     [-mh logical-host-name]
     [-M]
     [-i embedded-database-practical-directory]
     -d data-area-name
     -bf backup-file
     [-l unload-log-file-1,unload-log-file-2,...|
      -ld unload-log-storage-directory]
     -e output-result-file-storage-directory
     [-id embedded-database-setup-ID]

Description

Backs up the embedded database, or restores the embedded database using the backup and the unload log file.

Execution privileges

In Windows: Administrators privileges

In UNIX: Superuser privileges

Storage directory

In Windows:

JP1/AJS3 - Manager-installation-folder\tools\

In UNIX:

/opt/jp1ajs2/tools/

Arguments

-mh logical-host-name

Specification of this option is no longer necessary. The logical host name specified by this option is ignored.

-M

Specify this argument to restore the system area.

The system area stores the internal information about the embedded database system.

To restore the system area of the embedded database, you must start the embedded database in a special mode that allows the restoration of the system area.

In this mode, you cannot restore the data area. Once you complete restoration of the system area, you must execute the ajsembdbstop command to stop the embedded database, and then execute the ajsembdbstart command, without options, to restart the embedded database.

When you want to restore the system area and the data area, specify the same options other than -M, the same backup file, and the same unload file.

If you specify different options, or a different backup file or unload file, data might be damaged. Use caution.

In the following case, restore the data area after you restore the system area by specifying -M:

  • The embedded database server stops due to a failure, and does not start even if you attempt to restart it.

    1. Resolve the problem in the embedded database.

    2. Execute the ajsembdbstart command with the -r option to start the embedded database in the status where the system area can be restored.

    3. Execute the ajsembdbrstr command with the -M option to restore the system area of the embedded database.

    4. If step 3 ends normally, execute the ajsembdbstop command to stop the embedded database that has started in the status where the system area can be restored.

    5. Execute the ajsembdbstart command for the embedded database, to start the embedded database in the normal status.

    6. Execute ajsembdbrstr to restore the data area in the embedded database.

For details about the ajsembdbstart and ajsembdbstop commands, see ajsembdbstart in 3. Commands Used for Normal Operations and ajsembdbstop in 3. Commands Used for Normal Operations.

-i embedded-database-practical-directory

Specify the embedded database directory. Use an absolute path to specify the directory. In Windows, to include space characters in the specified absolute path, enclose the path in double quotation marks ("). You must specify the same directory that you specify in the -i option of the ajsembdbbuild command. In UNIX. If you omit the -i option of the ajsembdbbuild command during the setup, you can omit this option.

If you omit this argument, /opt/jp1ajs2/emdbd/_JF0/ is assumed.

If you specify both the -i option and the -id option, the value specified for the -i option takes precedence.

-d data-area-name

Specify the data area name of the embedded database. Use an absolute path to specify the directory. In Windows, to include space characters in the specified absolute path, enclose the path in double quotation marks ("). If you have specified the embedded database directory in the -d option of the ajsembdbbuild command, specify as follows:

For Windows:

directory-name-specified-in-the-d-option\ajssys02

For UNIX:

directory-name-specified-in-the-d-option/ajssys02

If you want to operate an embedded database created by using the jajs_setup or jajs_migrate command, use the ajsembdbidlist command to check the directory that contains the embedded database. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup.

For Windows:

[directory-name-displayed-by-the-ajsembdbidlist-command]\dbarea\ajssys02

For UNIX:

/var/opt/jp1ajs2/embdb/_JFn#/dbarea/ajssys02

If you operate the embedded database in a logical host environment set up by using the jajs_setup_cluster command, specify the value specified for the -d option.

For Windows:

[directory-name-specified-in-the-d-option]\jp1ajs2\embdb\_JFn#\dbarea\ajssys02

For UNIX:

[directory-name-specified-in-the-d-option]/jp1ajs2/embdb/_JFn#/dbarea/ajssys02

If you operate the embedded database in a logical host environment set up by using the jajs_setup command, specify the value specified for the -D option.

For Windows:

[directory-name-specified-in-the-d-option]\jp1ajs2\embdb\_JFn#\dbarea\ajssys02

For UNIX:

[directory-name-specified-in-the-d-option]/jp1ajs2/embdb/_JFn#/dbarea/ajssys02

#

Specify the value specified for the -id option of this command. If you omit the -id option, specify _JF0.

-bf backup-file

Specify the backup file that is acquired using ajsembdbbackup command.

Use an absolute path to specify the directory. In Windows, to include space characters in the specified absolute path, enclose the path in double quotation marks (").

-l unload-log-file-1,unload-log-file-2,...

Specify this argument to use the acquired unload log file to restore the embedded database. You specify this argument when you specify the -bl option of the ajsembdbbuild command to create an embedded database.

Use an absolute path to specify an unload log file. In Windows, to include space characters in the specified absolute path, enclose the path in double quotation marks ("). Specify the unload log files in the sequence they are acquired. When you specify two or more unload log files, enclose the path after -l in double quotation marks (").

If you do not specify -s option when you acquire the backup, you can omit the input of the unload log file. In such a case, the database is restored up to the point when the backup is acquired.

-ld unload-log-storage-directory

In the same way as the -l option, you can specify this option if you want to use unload log files for restoration. Specify the absolute path name of the directory that contains the unload log files.

In Windows, if you specify an absolute path that contains spaces, enclose the entire path in double quotation marks (").

-e output-result-file-storage-directory

Specify the directory that stores the output result of the restoration. In Windows, use an absolute path to specify the directory. To include space characters in the specified absolute path, enclose the path in double quotation marks ("). You must create the directory you are going to specify beforehand. If the specified directory does not exist, an error occurs.

The following file is stored in the specified directory:

  • Processing output result file

The file name is automatically assigned based on the following rules:

  • Output result file: RSTR_XXXXYYZZVVWW.log

    XXXX: Year

    YY: Month

    ZZ: Day

    VV: Hour

    WW: Minutes

-id embedded-database-setup-ID

Specify the setup identifier that identifies the embedded database in the _JFn format (n: 0-9 or A-Z). The value specified in this argument must be the same as the value specified in the -id option of the ajsembdbbuild command.

If you want to operate an embedded database created by using the jajs_setup, jajs_setup_cluster, and jajs_migrate commands, use the ajsembdbidlist command to check the setup identifier of the embedded database. For details on the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup.

If you omit this option, the system assumes _JF0.

If you specify both the -id option and the -i option, the -i option takes precedence.

Notes

Return values

0

Normal end

Values other than 0

Abnormal end

Actions to be taken if an error occurs

An error might occur when ajsembdbrstr command is executed. If an error occurs, read the following table and take appropriate action.

Table 3‒10: Actions to be taken if an error occurs when ajsembdbrstr command is executed

Message

Cause

Action to be taken

KFPR26227-E

The unload log file is not specified.

Execute the following embedded database commands such as pdstop or pdstart, specify the unload log file in -l option, and then re-execute the ajsembdbrstr command.

pdrels -r ALL -o

KAVS0996-E

  • An argument is incorrect.

  • Some options are not specified.

  • Mutually exclusive options are specified simultaneously.

  • The path specified in -i does not indicate the embedded database practical directory, or the user does not have read privileges.

Review the specified arguments and re-execute the command.

KFPR00765-I Pdrstr terminated, return code=8 or KFPR00765-I Pdrstr terminated, return code=12

  • The host name specified in -mh option is incorrect.

  • The path specified in -d, -bf, -e, or -l option is incorrect.

  • The path specified in -d, -bf, -e, or -l option is not a absolute path.

Review the specified path, execute the following embedded database command, and re-execute the command.

pdrels -r ALL -o

KFPR26203-E

There is no permission for the path specified in the -e option or -ld option.

Check the permissions for the specified path, and then re-execute the command. If AJS administrators operate the system, make sure that the AJS administrators have the appropriate privileges.

KFPS01984-E

The path specified in -i option is not a absolute path.

Revise the specified path, execute the pdstart command, and then re-execute the ajsembdbrstr command.

KFPH27006-E

There is no permission for the path specified in the -d option.

Check the permissions for the specified path, and then re-execute the command. If AJS administrators operate the system, make sure that the AJS administrators have the appropriate privileges.

KFPH27008-E

Referencing is not possible, because the database area is blocked.

Execute the following embedded database command, and then re-execute the ajsembdbrstr command.

pdrels -r ALL -o

Bad directory specified in -i option

The path specified in the -i option is not the path for the embedded database practical directory, or the user does not have the appropriate privileges. Alternatively, the system has not been set up correctly.

Specify the correct embedded database directory in -i option. Alternatively, check the permissions and then re-execute the command. If the embedded database directory is specified correctly, retry set up of the embedded database. If AJS administrators operate the system, make sure that the AJS administrators have the appropriate privileges.

KAVS2104-E

The setup ID specified in -id option is invalid or the embedded database is not set up.

Check whether the setup ID specified in -id option is correct. Alternatively, use ajsstatus to check whether the embedded database is set as the database for the scheduler service.

KAVS8409-E

The command cannot be executed because the backup enhancement function is enabled.

To restore the embedded database for which the backup enhancement function is enabled, use the jajs_dbrestore command.