Utility - simpleExportSnapshotRun


Utility - simpleExportSnapshotRun

Description :

This command exports a particular Snapshot Job run, and this command gives you more control over the resulting output than other similar commands. The exported file is saved in CSV format.

This command reports on each asset (that is, server object) included the Snapshot Job. For each asset, a row is added to the file with some default columns of information. You can also include additional information for each asset using the additionalColumns argument. For this argument you provide column names in the form of a string list (for example, Size:Checksum or Size,Checksum). If a column does not apply to an asset type, an empty value appears in that row for that type of asset.

Return type : java.lang.Void

Command Input :

Variable Name

Variable Type

Description

jobGroupName

String

Fully qualified job group where the Snapshot Job is stored.

jobName

String

Name of the Snapshot Job to export.

runId

Integer

Job Run Id of Snapshot Job run to export.

exportFileName

String

Name of the file that holds the export.

additionalColumns

com.bladelogic.om.infra.cli.helper.StringList

String list of additional columns of information to include in report.

Example

The following example shows how to export the job run result of a Snapshot Job. To prepare for the export, we first get the job key, and use it to get the job run key; we then convert the job run key to a job run ID, and then we are finally ready to run the export command.

Script

JOB_GROUP=/Job_Group

JOB_NAME="Snapshot Job"

JOB_DB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`

JOB_RUN_KEY=`blcli JobRun findAllRunKeysByJobKey $JOB_DB_KEY`

JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $JOB_RUN_KEY`

SNAPSHOT_JOB_RUN_EXPORT=`blcli Utility simpleExportSnapshotRun $JOB_GROUP $JOB_NAME $JOB_RUN_ID "C:\temp\JobExport.csv" "Size,Checksum"`

 

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