1.7.6 restoresystem (restoring the JP1/AO system)
Description
This command restores the backup data, such as the configuration and database information of JP1/AO, obtained by the backupsystem command. If the database is corrupted and cannot be recovered by using the restoresystem command, re-install JP1/AO, recover the database from its corrupted state, and then reuse the restoresystem command.
The following list shows the data restored when the command is executed:
Tasks#
Debug tasks#
Task histories
Services
Debug services
Service templates
Users
User groups
Service groups
Connection destination definitions
Shared service properties
Various definition files
- #
The status of restored tasks and debug tasks is changed after restoration as follows.
Table 1‒18: Status of tasks and debug tasks at backup time and after restoration Status of tasks and debug tasks at backup time
Status of tasks and debug tasks after restoration
Waiting
Canceled (The end date and time of the tasks and debug tasks are set to the date and time of restoration.)
Holding
In Progress
Failed
Waiting for Response
Abnormal Detection
Terminated
Long Running
Completed
Completed
Failed
Failed
Canceled
Canceled
Syntax
restoresystem /dir backup-data-path [/auto]
Arguments
- /dir backup-data-path
This option specifies the absolute or relative path to the backup folder that stores the backup data specified in the backupsystem command.
The configuration under the backup folder must be the same as the configuration under the folder acquired by the backupsystem command.
- /auto
This option causes the command to automatically start and stop the services and databases of JP1/AO and the Hitachi Command Suite products. If this option is omitted, the services and databases of JP1/AO and the Hitachi Command Suite products are not automatically started and stopped.
If you want to use this option in a cluster environment, services registered with the cluster software must be offline.
Located in
- In Windows:
JP1/AO-installation-folder\bin
- In Linux:
/opt/jp1ao/bin
Execute permission
Execute the command as a user with Administrator or root permissions. If a user without Administrator or root permissions executes the command, a message appears asking the user to elevate the permission level.
Remarks
Executing this command creates a temporary file. For this reason, make sure that the backup folder has a sufficient free space. The required free space is as follows:
Total size of the files to be backed up * 1.2+20 MB
This command does not restore the files below. Manually set the following files again if necessary:
SSL server certificate file for HTTPS connection
Private key file for HTTPS connection
Private key file for public key authentication
-
Truststore file
Cluster service control command that was created (in a Linux cluster configuration)
Place the files for HTTPS connection in a location defined in the user_httpsd.conf file, and place the file for public key authentication in a location defined in the user-specified properties file (config_user.properties).
If you do not specify the auto option, then make sure that JP1/AO services are not running before executing this command.
If these services are still running, execute the hcmds64srv command with the stop option to stop the services.
Be careful if the JP1/AO installation path includes half-width space characters. If there is a file or folder whose path is the same as the string before the first space character in that path, the restoresystem command will fail with return code 114. If this happens, move that file or folder to a different path, re-install JP1/AO, and then execute the restoresystem command again.
For example, assume that JP1/AO is installed in C:\Program Files\HITACHI\JP1AO. In this case, the restoresystem command will fail if there is a file or folder whose path is C:\Program.
In the restored tasks and debug tasks, the following operations cannot be selected:
Retry the Task From the Failed Step
Retry the Task From the Step After the Failed Step
In the restored tasks and debug tasks, the progress and status of the step are not displayed.
Return code
The following table lists the return codes from the command.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
The argument is invalid. |
2 |
The command execution has been interrupted. |
3 |
The service status is invalid. |
4 |
One of the other commands is running. |
7 |
An invalid path is specified. |
9 |
The specified path does not exist. |
10 |
The specified path is not accessible. |
14 |
You do not have permission to execute the command. |
110 |
Performing the restoration failed. |
111 |
Starting or stopping the service failed. |
113 |
The backup file is invalid. |
114 |
The environment is invalid. |
255 |
The command execution has been interrupted due to an error other than the above. |
Example
The following example shows how to use the command to restore, in Windows, data in the specified backup folder (C:\Users\Backup):
restoresystem /dir C:\Users\Backup /auto