13.11 dcmpkput.exe (recovering a package by using a backup
This section describes the dcmpkput command, which recovers a package by using a backup. Note that this command does not use a parameter file.
Function
This command recovers a package by using a backup file, and stores the package in a specified cabinet.
Format
dcmpkput.exe [/C cabinet-ID] /i input-source-directory [/of input-file-name] [/f] [/LC {ON|OFF}]
Arguments
-
/C
In the argument /C, specify the ID of the cabinet in which to store the package recovered by using a backup. If the specified cabinet is not found, the cabinet is created automatically. When no cabinet ID is specified, the package is stored in its original cabinet.
-
/i
In the argument /i, specify the full path name of the output-destination directory specified for the dcmpkget command. You cannot specify a network drive as the input-source directory.
-
/of
In the argument /of, specify the name of a backup file that has been created by the dcmpkget command. You can use a wildcard character (*) for the argument /of. When this argument is omitted, this command uses all the backup files whose name begins with dcmpkget.
When the directory specified in the argument /i contains multiple backup files, you can specify all the backup files under the directory as follows:
dcmpkput.exe /i C:\temp\pkg /of *
-
/f
When the argument /f is specified, if a package that is the same as the recovered package exists in the specified cabinet, this command overwrites the existing package with the recovered package. When the argument /f is omitted, this command does not overwrite the existing package, but returns the return code 5.
-
/LC
In the argument /LC, write ON or OFF to specify whether to continue command processing even if you log off from Windows while executing this command as a background service by using the Task Scheduler or JP1/AJS.
-
ON
Continues command processing even when you log off from Windows.
-
OFF
Forcibly ends command processing when you log off from Windows.
This argument is effective when this command is executed from a service on the following OS:
-
Windows Server 2003
When you enter this command from the command prompt, this command is executed as a foreground program. Therefore, in such a case, do not specify /LC ON.
You can also use a registry to set whether to continue command processing even if you log off from Windows.
Note that the command operation differs depending on the combination of the specification of the argument /LC and the setting in the registry. For details, see 13.20 Command operation at logoff according to registry setting and logoff option.
-
Return codes
The following table lists the return codes that are output when the dcmpkput command is executed:
Code |
Meaning |
Action to be taken |
---|---|---|
0 |
The package was recovered successfully. |
None |
1 |
The output file output by the dcmpkget command cannot be opened, or its file format is incorrect. |
Check the path name and the file format of the output file. |
2 |
An invalid value was specified in a command argument. |
Check the values set in command arguments. |
3 |
Connection to the database failed. |
Check database settings in the setup of the managing server. |
4 |
The specified backup file was not found. |
Check the path name of the backup file. |
5 |
|
|
12 |
Restoration of one or more archive files failed. |
Reference the event log. |
Note
-
If package recovery fails during execution of this command with multiple packages specified, the dcmpkput command cancels package recovery processing. Then, this command returns a return code indicating an error.
Example
The following example shows use of this command to recover a package by using a backup file made by the dcmpkget command.
To recover packages by using all the backup files stored under C:\Dmbat\backup, and store them in the cabinet that has a cabinet ID of 01, specify the command as follows:
dcmpkput.exe /C 01 /i C:\Dmbat\backup /of *