Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

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

SERVER="Server Name"

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`

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.3