Information

This site will undergo a brief period of maintenance on Thursday, 23 April at 2:30 AM Central/1:00 PM IST. During a 30 minute window, site availability may be intermittent.

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.

Snapshot - getSnapshotKeyByJobKeyAndRunId


Snapshot - getSnapshotKeyByJobKeyAndRunId

Description :

This command is deprecated. Use getSnapshotKeyByJobRunId instead.

This command returns a snapshot key (a job result key) based on a job key, runID, template name (not fully qualified), and server name.

You can get a job key using the command SnapshotJob getDBKeyByGroupAndName .

To get the runId, first get the job run key. The JobRun : findAllRunKeysByJobKey command has an example of how to do this. Once you have the job run key, you can use the JobRun : jobRunKeyToJobRunId command to get the runId.

You need a snapshot key for commands such as AuditJob createSnapshotToComponentAuditJob or BlPackage createPackageFromSnapshot . This command returns a snapshot key.

Return type : com.bladelogic.om.infra.model.base.keys.SJobResultKey

Command Input :

Variable Name

Variable Type

Description

jobKey

com.bladelogic.om.infra.model.base.keys.SJobKey

Key of the Snapshot Job.

runId

Integer

ID of a particular Snapshot Job run.

templateName

String

Name of the template of interest.

targetServerName

String

Name of the server of interest.

Example

The following example shows how to find a snapshot key for the first run of a Snapshot Job.

Script





$TEMPLATE_NAME=basefiles

SNAP_JOB_KEY=`blcli SnapshotJob  [getDBKeyByGroupAndName|SnapshotJob - getDBKeyByGroupAndName] /Snapshots snapbasefiles`

#use the first run

RUNID=1

SNAPSHOT_KEY=`blcli Snapshot getSnapshotKeyByJobKeyAndRunId $SNAP_JOB_KEY $RUNID $TEMPLATE_NAME $MASTERSERVER `



 

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

BMC Server Automation Command Line Interface 8.3