Hitachi

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


ajsrestore

Organization of this page

Format

ajsrestore
     [-F service-name]
     [-b backup-information-directory-name]
     [-d restoration-destination-unit-name]
     [{-i|-e|-f}]
     [-t]
     [-S]
     -n backup-box-name
     [backup-file-name...]

Description

Restores a unit backed up to the backup box to the unit definition information directory.

Execution privileges

You must have any of the following JP1 privileges:

We recommend that the user who executes this command have administrator privileges (in Windows systems) or superuser privileges (in UNIX systems).

Arguments

-F service-name

Specify the name of the target scheduler service.

You can specify a character string of 1 to 30 bytes.

-b backup-information-directory-name

Specify the full path of the directory if you use a directory other than the backup information directory# specified at the time of configuration.

You can specify a character string of 1 to 255 bytes.

By default, the system assumes the backup information directory# specified at the time of configuration.

#

It refers to the directory name specified by the AJSBKUROOT environment setting parameter.

-d restoration-destination-unit-name

When restoring a unit backed up, specify a job group or jobnet name to be used in the restoration destination.

You can specify a character string of 1 to 899 bytes.

-i

If the restoration destination contains a unit having the same name as a unit to be restored, this option displays a message and a prompt for confirmation.

-e

An error occurs if the restoration destination contains a unit having the same name as a unit to be restored. No information is updated.

-f

Forcibly updates the unit even if the restoration destination contains a unit having the same name as a unit to be restored.

-t

Outputs a list of names of the units backed up in the backup box to the standard output file.

You can change the output format by setting the AJSDISPSUBUNITTYPE environment variable.

  • When outputting a job group type

    Set the AJSDISPSUBUNITTYPE environment variable to YES.

    Note

    A job group type is displayed only when the type of the saved unit is a job group.

  • When not outputting a job group type

    Select either of the following:

    • Set the AJSDISPSUBUNITTYPE environment variable to NO.

    • Specify no value for the AJSDISPSUBUNITTYPE environment variable.

For details about the AJSDISPSUBUNITTYPE environment variable, see Table 1-6 in 1.4 Environment variables.

-S

Even for suspended jobnets that have been registered for execution, this option makes it possible to update the unit in these jobnets. Even for suspended jobnets, however, you cannot update definitions if any of the following situations occur:

  • When the definition of the root jobnet is being updated

  • When the definitions of job groups containing the definition of the root jobnet are being updated

  • When jobnets are being executed

-n backup-box-name

Specify a backup box name.

You can specify a character string of 1 to 50 bytes.

The name of the backup box depends on the file system of your operating system. It is case-sensitive if you are using UNIX and case-insensitive if you are using Windows.

backup-file-name

Specify the name of a file to be restored in the backup box.

You can specify a value from 0001 to 1024.

You can specify multiple backup file names.

If you omit this option, all the backup files in the backup box are restored.

Notes

Return values

0

Normal end

Multiple of 4 within the range from 4 to 124

Abnormal end

Additional information

Example 1

The following command forcibly restores all the backup files saved in backup box BOX1 to job group /Materials/ShipManagement although it contains a unit having the same name as the unit to be restored.

ajsrestore -f -d /Materials/ShipManagement -n BOX1

Example 2

The following command outputs a list of the units (jobnets) saved in backup box BOX1.

ajsrestore -t -n BOX1
Output example:
0001:/Materials:Template:g
0002:/Materials/ShipManagement:ShipSlipCreation:n

Example 3

The following command outputs a list of the units (jobnet connectors) saved in backup box BOX1.

ajsrestore -t -n BOX1
Output example
0001:/Materials:Template:g
0002:/Materials/ShipManagement/ShipSlipCreation:JobnetExecutionWait:nc