BlPackage - createPackageFromDeltaByJobKey
BlPackage - createPackageFromDeltaByJobKey
Description :
This command creates a delta-based BLPackage by specifying the job key of the Snapshot Job from which the package will be created. The package will contain the difference between a snapshot of an asset (server object), and the current live value of that asset on the target server. The argument jobKey is a handle to the Snapshot Job from which the package will be created. This command returns a handle to the newly created package and can be used as input to commands that need a handle to the package.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
packageName | String | Name of the package. |
groupId | Integer | ID of a group that should contain the package. |
jobKey | String | Key of the Snapshot Job of interest. |
jobRunId | Integer | Run number of the Snapshot Job. |
templateName | String | Name of the template. |
targetServerName | String | Name of the target server. |
bSoftLinked | Boolean | True to create a package soft linked to the depot object resources, false otherwise. |
bCollectFileAcl | Boolean | True to package the file ACLs, false otherwise. |
bCollectFileAttributes | Boolean | True to package the file attributes, false otherwise. |
bCopyFileContents | Boolean | True to package the file contents, false otherwise. |
bCollectRegistryAcl | Boolean | True to package the registry ACLs, false otherwise. |
Example
The following example shows how to create a BLPackage from delta. It requires the Job handle (SNAP_DBKEY), JobRun handle (SNAP_RUN_DBKEY), and target server (TARGET_NAME) for a template-based Snapshot Job run.
Script
# Name of the package.
PACKAGE_NAME="package1"
# Get the ID of the depot group in which the package will be saved.
DEPOT_GROUP_ID=`blcli DepotGroup groupNameToId /parent/group1`
# This boolean value sets the Depot Asset Options - soft link check box. True for checked.
bSoftLinked="false"
# This boolean value sets the File Options - Collect ACL control lists check box. True for checked.
bCollectFileAcl="false"
# This boolean value sets the File Options - Collect File Attributes check box. True for checked.
bCollectFileAttributes="false"
# This boolean value sets the File Options - Copy File Contents check box. True for checked.
bCopyFileContents="true"
# This boolean value sets the Registry Options - Collect ACL check box. True for checked.
bCollectRegistryAcl="false"
# A collection of the above options.
PACKAGE_OPTIONS="$bSoftLinked $bCollectFileAcl $bCollectFileAttributes $bCopyFileContents $bCollectRegistryAcl"
# Now create new package.
# Get the template DBKey for the asset you wish to package.
TEMPLATE_NAME=template1
TEMPLATE_GROUP=/template_group
TEMPLATE_DBKEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE_NAME
# Convert the jobRun DBKey to jobRun Id.
SNAP_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $SNAP_RUN_DBKEY`
PACKAGE1_DBKEY=`blcli BlPackage createPackageFromDeltaByJobKey $PACKAGE_NAME $DEPOT_GROUP_ID $SNAP_DBKEY $SNAP_RUN_ID $TEMPLATE_NAME $TARGET_NAME $PACKAGE_OPTIONS`