14.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]
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.
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. |
Notes
-
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.
-
When you restore a backup of a UNIX-version package, specify the restoration destination as an existing cabinet that was created by specifying UNIX for Cabinet type. You cannot restore backups of UNIX-version packages if existing cabinets were created by specifying Windows for Cabinet type or there are no existing cabinets.
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 *