17.24 importdb (restoring backup data)
This section describes the importdb command that restores data owned by the management server to the state of the last backup point.
Functionality
This command restores data owned by the management server to the state of the last backup point in case a disk failure occurs. To restore data, a backup file acquired with the exportdb command is used.
Execute this command on the following servers:
-
In a single-server configuration system: Management server
-
In a multi-server configuration system: Database server
In a multi-server configuration system, execute the commands in the following order:
-
Execute the stopservice command on the management server. Alternatively, you can go to the Windows Start menu and select Administrative Tools and then Services, to stop the following services:
-
JP1_DTNAVI_WEBCON
-
JP1_DTNAVI_AGCTRL
-
JP1_DTNAVI_MGRSRV
-
-
Execute the stopservice command on the database server.
-
Execute the importdb command on the database server.
Format
importdb[ -f data-storage-folder-name][ -w work-folder-name][ -s]
Argument
- -f data-storage-folder-name
-
Specify the absolute path to the folder in which the backup file of the target restore point resides. Only a folder in a local drive can be specified.
To specify a path containing a space, enclose the strings with double quotation marks ("). Specify a folder name that is 150 bytes or fewer in length, and exclude the backslash (\) at the end of the folder name. Half-width alphanumeric characters, white space, and the following special characters are allowed:
#, (, ), .(period), @, \
If any characters other than above are used for the JP1/IT Desktop Management installation folder, always specify this argument.
The following data storage folders are used during command execution for restoring data, when this argument is specified or omitted.
- When this argument is specified:
-
The data storage folder specified in the argument is used.
- When this argument is omitted:
-
The most up-to-date data storage folder available under the path below is chosen by name.
JP1/IT Desktop Management-installation-folder\mgr\backup\
For example, if the folder has three data storage folders, \20110101023000, \20110102023000, and \20110103023000, then \20110103023000 will be chosen to be used for restoring.
- -w work-folder-name
-
Specify the absolute path to the work folder to be used for restoring to the backup point. Only the folders in a local drive can be specified. 10 GB or more is required for the drive where the work folder resides, in order to manage 10,000 devices.
To specify a path containing a space, enclose the strings with double quotation marks ("). Specify a folder name that is 150 bytes or fewer in length, and exclude the backslash (\) at the end of the folder name. Half-width alphanumeric characters, white space, and the following special characters are allowed:
#, (, ), .(period), @, \
If characters other than above are used for the JP1/IT Desktop Management installation folder, always specify this argument. If the specified folder does not exist, an error is returned.
When this argument is omitted, the folder below is used as a work folder.
JP1/IT Desktop Management-installation-folder\mgr\temp
- -s
-
Specify if you want to automatically run a set of commands for stopping the management server services (the stopservice command), restoring the database with a backup (the importdb command), and starting the management server services (the startservice command).
Storage location
JP1/IT Desktop Management-installation-folder\mgr\bin\
You can execute this command without specifying the storage location for the executable file, by using the command prompt provided by JP1/IT Desktop Management.
Notes
-
Execute this command in the following state:
In a single-server configuration system: When the management server setup is completed and the management server is not running
In a multi-server configuration system: When the database server is completed, and the services on the management server and the database server are not running
-
This command cannot be simultaneously executed by multiple users.
-
This command cannot be executed simultaneously with any of the following commands:
-
exportdb
-
ioassetsfieldutil export
-
ioassetsfieldutil import
-
ioutils exportasset
-
ioutils exportdevice
-
ioutils exportdevicedetail
-
ioutils exportfield
-
ioutils exportfilter
-
ioutils exportoplog
-
ioutils exportpolicy
-
ioutils exporttemplate
-
ioutils exportupdategroup
-
ioutils importasset
-
ioutils importfield
-
ioutils importfilter
-
ioutils importpolicy
-
ioutils importtemplate
-
ioutils importupdategroup
-
reorgdb
-
startservice
-
stopservice
-
updatesupportinfo
-
-
The argument -s cannot be specified in a cluster environment or in a multi-server configuration system. If you specify this argument, the command fails.
Return value
The following table shows the return values of the importdb command.
Return value |
Description |
---|---|
0 |
The command finished normally. |
1 |
Restoration from a backup was successful, but a failure occurred with automatically starting the management server. |
11 |
The format for specifying the command arguments is invalid. |
12 |
The specified data storage folder is invalid, or the folder does not exist. |
13 |
A backup file does not exist in the specified data storage folder. |
14 |
The specified work folder is invalid, or the folder does not exist. |
15 |
The disk does not have enough space. |
31 |
Another command is being executed. |
34 |
The starting of the database failed. |
35# |
The management server or the database server was in a start process when the command is executed. |
36 |
The database was in a shutdown process when the command was executed. |
51 |
You do not have the permissions to execute this command. |
52 |
The argument -s is specified in a cluster environment or in a multi-server configuration system. |
53 |
The management server has not stopped in a single-server configuration system The management server or database server has not stopped in a multi-server configuration system. |
54 |
The management server or database server has not been set up. |
55 |
The default data storage folder and the work folder are not usable. |
56 |
A backup of an older version was specified. |
61 |
Cannot connect to the backup folder for the operation logs. |
62 |
Cannot log in to the backup folder for the operation logs. |
63 |
The operation log-related folder does not have enough free space. |
64 |
The backup of the operation log was interrupted due to some other error. |
101 |
A restoration using a backup failed. |
102 |
Failed to automatically stop the management server. |
110 |
Command execution failed due to a problem with the license. |
150 |
Command execution was interrupted due to some other error. |
#: The value to be returned when argument -s is specified
Example
The following example shows use of this command to stop the management server services, restore data using a backup acquired on January 3rd, 2011, 2:30:00 (in the backup data folder C:\tmp\backup\20110103023000), and start the management server services automatically.
importdb -f C:\tmp\backup\20110103023000 -s
Related Topics: