jpctool db restore
- Organization of this page
Format
jpctool db restore -key service-key -d directory-name [-lhost logical-host-name] [-inst instance-name]
Function
The jpctool db restore command restores database data for data backed up from the Master Store service, Agent Store service, or Remote Monitor Store service by using the jpctool db backup command.
Data can be restored only if has been backed up at the host where restoration is executed.
The Agent Store and Remote Monitor Store service data can be restored only to a Store database of the same version.
Hosts that can execute the command
-
PFM - Manager
-
PFM - Agent
-
PFM - RM
Execution permission
- In Windows:
-
-
User with Administrators permissions
-
User with Backup Operators permission
-
- In UNIX:
-
User with root user permissions
Installation directory
- In Windows:
installation-folder\tools\
- In UNIX:
/opt/jp1pc/tools/
Arguments
-key service-key
Specifies the service key of the data to be restored. A product name can also be specified when the product name display functionality is enabled. To restore data to the Master Store service database, the service key Manager or mgr is used. For details about the service key of the Agent Store or Remote Monitor Store service, see the naming rules described in the appendix of the JP1/Performance Management Planning and Configuration Guide.
-d directory-name
Specifies the name of the directory storing the backup files. For directory-name, specify a string of 1 to 130 bytes, consisting of alphanumeric characters, symbols, and the space character. Note that the following symbols cannot be specified:
; , * ? ' " < > |
If the name contains spaces, enclose the entire name in double quotation marks (").
-lhost logical-host-name
Specifies the host environment in which this command is executed. You use this argument if a logical host has been configured on the machine that is used to execute this command. For logical-host-name, specify a string of 1 to 32 bytes, consisting of alphanumeric characters with no space characters.
If this argument is omitted, the physical host is assumed. Wildcard characters cannot be used.
-inst instance-name
If the data is to be restored to a specific instance of the database, specifies the instance name. For instance-name, specify a string of 1 to 32 bytes, consisting of alphanumeric characters. This option is applicable when the PFM - Agent or PFM - RM specified in the service key has instance environments.
Notes
-
Before restoration, stop the PFM - Agent, PFM - RM, or PFM - Manager service that is to be restored.
-
You must specify the arguments in the order they appear in Format.
-
When restoration executes, the existing data is deleted.
-
After restoration, the database indexes are rebuilt at the time of service startup, which may cause the restart to take a long time.
-
Data cannot be restored to a different version of the database from the data model version that was backed up by the jpctool db backup command.
-
Data cannot be restored when the service key differs from the service key of the data that was backed up by the jpctool db backup command.
-
If command execution is interrupted by pressing the Ctrl + C keys or by a signal, a predefined return value is not returned. Therefore, you should ignore the return value when the command was interrupted by the Ctrl + C keys or by a signal.
-
When the Store version is 1.0, indexes are re-created. When the Store version is 2.0, indexes are not re-created because the backup files contain an IDX file.
Return values
0 |
The command terminated normally. |
1 |
An argument specification is invalid. |
2 |
The user does not have execution permission for the command. |
4 |
Command was executed while the Store database was being accessed by the Master Store, Agent Store, or Remote Monitor Store service, or jpctool db restore command. |
5 |
The specified service has not been installed. |
6 |
A backup file or directory was not found. |
100 |
The Performance Management environment is invalid. |
102 |
The specified logical host name or instance has not been set up. |
200 |
A memory shortage occurred. |
210 |
A disk space shortage occurred. |
211 |
A backup file or directory cannot be accessed. |
212 |
Index creation failed. |
255 |
An unexpected error occurred. |
Usage example1
This example restores to the Agent Store service in the PFM - Agent for Platform (Windows) data that was backed up at the default location:
jpctool db restore -key Windows -d "c:\program files\hitachi\jp1pc\agtt\store\backup\01"
Usage example 2
This example restores the data in /opt/jp1pc/agto/store/inst1/backup/01 to instance inst1 of the database for PFM - Agent for Oracle on a logical host (host name: jp1-ha1):
jpctool db restore -key Oracle -d /opt/jp1pc/agto/store/inst1/backup/01 -lhost jp1-ha1 -inst inst1