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]
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.20 How to specify reserved words.
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 |
/KW or /KP |
- Legend:
-
Y: The parameter must be specified.
Y/N: The parameter can be omitted.
N: The parameter is not necessary (is ignored even when specified).
--: The content cannot be specified by using a command argument.
- #1
-
For this command, you cannot use a reserved word for any parameter in the PACKAGING_INFORMATION tag.
- #2
-
You can omit this parameter when you intend to specify only a cabinet ID. When only a cabinet ID is specified, this command backs up all the packages in the specified cabinet.
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 [/KW|/KP] /o output-destination-directory [/of output-file-name]
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.
-
If you back up a UNIX-version package that is created without a script file specified, no SCI file is output.
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