SnapshotJob - createComponentBasedSnapshotJob
SnapshotJob - createComponentBasedSnapshotJob
Description :
This command creates a Snapshot Job based on a component.
This command returns a handle to the newly created Snapshot Job. The DBKey can be used in other commands that need to reference the Snapshot Job you have created.
You must provide an ID for the job group that will contain this Snapshot Job. You can find this ID using JobGroup groupNameToId .
The componentKey argument provides a DBKey to a component that is the target for this job. You can add this DBKey to the job using SnapshotJob addComponentToJobByJobDBKey.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
jobName | String | Name of the job to be created. |
groupId | Integer | ID of the parent job group for the Snapshot Job. |
componentKey | DBKey | Handle to the component that is the target of this Snapshot Job. |
Example
The following example shows how to create a Snapshot Job based on a component:
Script
TEMPLATE_GROUP="/Template_Group"
TEMPLATE="Template_Name"
COMP_NAME="Comnponent_Name"
JOB_NAME="Job Name"
JOB_GROUP="Job Group Name"
SERVER_ID=`blcli Server getServerIdByName $SERVER`
TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE`
COMPONENT_KEY=`blcli Component createComponent $COMP_NAME $TEMPLATE_KEY $SERVER_ID`
JOB_GROUP_ID=`blcli JobGroup groupNameToId $JOB_GROUP`
COMP_BASE_SNAPSHOT=`blcli SnapshotJob createComponentBasedSnapshotJob $JOB_NAME $JOB_GROUP_ID $COMPONENT_KEY`