13.10 dcmpkget.exe (making a backup of a package)
This section describes the dcmpkget command, which makes a backup of a package.
Function
This command makes a backup of a specified package.
Format
dcmpkget.exe /i parameter-file /o output-destination-directory [/of output-file-name] [/LC {ON|OFF}]
Arguments
-
/i
In the argument /i, specify the full path name of the parameter file.
You can also use the output file output by the dcmpack command as the parameter file. Note, however, that the package_name parameter in the PACKAGING_INFORMATION tag is ignored.
-
/o
In the argument /o, specify the full path name of the output-destination directory. If the specified directory is not found, the directory is created automatically. You cannot specify a network drive as the output-destination directory.
-
/of
In the argument /of, specify the name of the file to be created in the output-destination directory. The default of the file name is dcmpkget. A backup file name is created by adding a string of package attributes (cabinet ID, package ID, version number, and generation number) to the file name specified in this argument. The backup file name has an extension of .dpf, .pkg, .sci, or .xml. If the version number includes the character /, the character is replaced with $ in the backup file name.
You can specify a backup file name that has a maximum of 256 single-byte characters (or 128 double-byte characters). The final backup file name with the string of package attributes added might exceed the maximum number of characters. If this occurs, the backup file name you specified is shortened so that the final backup file name does not exceed the maximum number of characters.
For the argument /of, you can use reserved words, such as \CY, \CM, \CD, \CH, \CN, \CS, \VERSION, and \PKGID. When \VERSION or \PKGID is specified in the argument /of, the dcmpack command references the corresponding value in the definition of the package specified first, or ignores the reserved word if the definition is not found. For details about reserved words, see 13.19 How to specify reserved words.
-
/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 cases, 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.
-
Correspondence between the specification contents of parameter file and command arguments
The contents of the parameter file for this command can also be specified in command arguments. The table below shows the specification contents of the parameter file and the command arguments corresponding to them.
If a specification item is specified in both a parameter file and a command argument, only the specification in the command argument is effective (the specification in the parameter file is ignored). Note, however, that, if you specify only some of the package attributes by using command attributes, only the first package information specified under the PACKAGING_INFORMATION tag in the parameter file is effective.
Specification content of parameter file |
Content |
Whether to specify |
Command argument |
|
---|---|---|---|---|
Tag |
Parameter |
|||
package_name |
Package name |
N |
-- |
|
package_id |
Package ID |
Y#2 |
/I value |
|
version_revision |
Version/revision |
Y#2 |
/v value |
|
generation |
Generation number |
Y#2 |
/G value |
|
cabinet_name |
Cabinet name |
N |
-- |
|
cabinet_id |
Cabinet ID |
Y |
/C value |
|
package_code |
Code type |
Y/N |
/KP |
Command format without using any parameter file
The following shows the command format to be used when you specify only command arguments without using a parameter file.
dcmpkget.exe /I package-ID /v version/revision /G generation-number /C cabinet-ID [/KP] /o output-destination-directory [/of output-file-name] [/LC {ON|OFF}]
Return codes
The following table lists the return codes that are output when the dcmpkget command is executed:
Code |
Meaning |
Action to be taken |
---|---|---|
0 |
The backup file was output successfully. |
None |
1 |
The parameter file cannot be opened, or the file format is incorrect. |
Check the path name and specification format of the parameter file. |
2 |
An invalid value was specified in a command argument or the parameter file. |
Check the values specified in command arguments and the parameter file. |
3 |
Connection to the database failed. |
Check database settings in the setup of the managing server. |
4 |
The specified package was not found. |
Check whether the specified package exists on the managing server. |
5 |
Connection to the JP1/IT Desktop Management 2 service failed. |
Check whether the service of JP1/IT Desktop Management 2 - Manager has started. |
12 |
Restoration of one or more archive files failed. |
Reference the event log. |
14 |
The output file or output-destination directory could not be created. |
Check the path names of the output-destination directory and output file. |
Notes
-
If a specified package is not found when this command with multiple packages specified is executed, this command skips backing up of the unfound package, and then backs up other specified packages. When a specified package is not found, this command returns return code 4.
-
If backing up of a package fails during execution of this command with multiple packages specified, this command cancels backup processing. Then, this command deletes all the backup files it has created before canceling the backup processing, and returns a return code indicating an error.
Example
The following example shows use of this command to create a backup of a package (stored in the cabinet with cabinet ID 01) whose package ID is 0100, version/revision is 0100, and generation number is 0000.
- Creating the parameter file
-
Specify the package to be backed up and the cabinet containing the package as shown below, and then save the parameter file under any name.
** dcmpkget Parameter File Sample PACKAGING_INFORMATION{ package_id=0100 version_revision=0100 generation=0000 cabinet_id=01 package_code=P }
- Executing the command
-
To store the created parameter file as C:\Dmbat\dcmpkget.txt and create a backup under C:\Dmbat\backup, specify the command as follows:
dcmpkget.exe /i C:\Dmbat\dcmpkget.txt /o C:\Dmbat\backup /of BackupFile