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:
-
JP1_AJS_Admin privilege
-
JP1_AJS_Manager privilege
-
JP1_AJS_Editor privilege
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
-
Either of the following users can restore a unit:
-
A user who has the update privilege for the unit to be restored
-
A JP1 user mapped to the OS user who has Administrators or superuser privileges
Note, however, that if yes is set after changing the ADMACLIMIT environment setting parameter from its default, even a JP1 user who was mapped to an OS user with Administrators or superuser privileges must have the update privilege.
-
-
You cannot restore the unit in the following cases:
-
You do not have the reference privilege for both the backup box and backup file.
-
The restoration destination contains no units.
-
Restoration would result in an invalid hierarchical structure, such as restoring a job group in a jobnet.
-
The number of nests in the job group or jobnet exceeds 30 (10 if the DEFLENTYPE environment setting parameter is set to sjis), the maximum allowed.
-
-
If the restoration destination contains a unit having the same name as a unit to be restored, delete that unit before attempting to restore a unit.
-
Before restoring a root jobnet registered for execution and the job group or planning group containing the root jobnet, you must use the ajsleave command to cancel the registration (Otherwise, the restore process is not effective). For those units other than in the root jobnet, the job group containing the root jobnet, and the remote jobnet, however, specifying the -s option in this command while keeping the target jobnet suspended makes it possible to conduct the delete process without having to cancel the registered jobnet. (If the target unit is currently being executed, the delete process is not effective even if the -s option is specified.)
-
This command terminates abnormally if the jobnet specified at the destination's unit is undergoing a suspended-state change.
-
You cannot restore a planning group into a jobnet.
-
You cannot restore any unit other than a jobnet or remote jobnet into a planning group.
Return values
0 |
Normal end |
Multiple of 4 within the range from 4 to 124 |
Abnormal end |
Additional information
-
If you omit a backup file name, the backup files are restored in the order in which they were created.
-
The place where a recovered unit appears in the Jobnet Editor window of JP1/AJS3 - View is determined automatically. The unit with the same name appears in the same location as before restoration.
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