8.7.4 hcmdsdbtrans (backing up and restoring the databases)
Description
This command backs up (exports) or restores (imports) the databases of JP1/AO. You use this command when re-organizing the databases of JP1/AO.
Syntax
- To back up (export) the databases of JP1/AO:
hcmdsdbtrans /export /workpath working-folder-path /file archive-file-path [/auto]
- To restore (import) the databases of JP1/AO:
hcmdsdbtrans /import /type Automation /workpath working-folder-path [/file archive-file-path] [/auto]
Arguments
- /export
-
This option causes the command to export the databases.
- /workpath working-folder-path
-
This option specifies the absolute path to a working folder that is temporarily used for exporting or importing. A folder on the local disk drive can only be specified.
Use an empty folder for the working folder when you specify the /file option for exporting or importing.
- /file archive-file-path
-
This option specifies the absolute path to the archive file to which the data is exported or from which the data is imported. This option is required if the /export option is specified.
The archive file is not created if the output file size exceeds 2 GB, or if the amount of disk space for a location in which the archive file is created is insufficient.
- /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.
- /import
-
This option causes the command to import the databases. All the exiting authentication data is deleted before the data is imported.
- /type Automation
-
This option specifies Automation as the name of the product whose database is to be imported.
Located in
Common-Component-installation-folder\bin
Execute permission
Execute the command as a user with Administrator permissions.
Remarks
-
If the return code 3 or 5 is output by an export operation, the database information remains in the directory specified for the /workpath option.
To import this information, set the directory that you specified for the /workpath option at the time of the export operation for the /workpath option for the import operation. At this time, do not change the folder structure in the directory you specified for the /workpath option at the time of the export operation. In addition, do not specify any value for the /file option when performing the import operation.
-
In the following cases, the directory specified for the /workpath option becomes empty, and the command is completed.
-
When the return code 1, 2, 233, 234, 235, 237, 238, 239, 240, or 255 is output by an export operation
-
When the return code 3 is output by an import operation
-
Return code
The following table lists the return codes from the command with the /export option.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
Obtaining the product version failed. |
2 |
The databases are not running. |
3 |
Archiving the databases failed. |
4 |
The working folder is not empty. |
5 |
Archiving the databases failed due to their total size being larger than 2 GB. |
233 |
Restarting the databases is being interrupted. |
234 |
The database services are stopped or do not exist. |
235 |
The databases are not initialized. |
237 |
Starting the Hitachi Command Suite products or databases failed. |
238 |
Stopping the Hitachi Command Suite products or databases failed. |
239 |
Starting the databases failed. |
240 |
Stopping the databases failed. |
255 |
The command terminated abnormally. |
The following table lists the return codes from the command with the /import option.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
Obtaining the product version failed. |
2 |
The databases are not running. |
3 |
Extracting the archive file failed. |
4 |
The working folder is not empty. |
5 |
The specified product is not included in the archive file. |
6 |
The specified product is not installed. |
7 |
A version of the product that cannot be imported is found. |
8 |
The working folder has no data to be imported, or the data for importing has an invalid format. |
9 |
You attempted to import the data on the secondary server into the primary server. |
10 |
You attempted to import the data on the primary server into the secondary server. |
11 |
You attempted to import the data into the database in use. |
233 |
Restarting the databases is being interrupted. |
234 |
The database services are stopped or do not exist. |
235 |
The databases are not initialized. |
237 |
Starting the Hitachi Command Suite products or databases failed. |
238 |
Stopping the Hitachi Command Suite products or databases failed. |
239 |
Starting the databases failed. |
240 |
Stopping the databases failed. |
255 |
The command terminated abnormally. |
Example
The following commands show examples of how to use the command for each case.
-
To back up the databases of JP1/AO:
hcmdsdbtrans /export /workpath "C:\Users\workfolder" /file "C:\backup\arcfile01" /auto
-
To restore the databases of JP1/AO:
hcmdsdbtrans /import /type Automation /workpath "C:\Users\workfolder" /file "C:\backup\arcfile01" /auto
Related topic