Delete - cleanupHistoricalData_1


Delete - cleanupHistoricalData

Description :

This command cleans up a specific type of historical data from the database. Historical data includes Compliance Job results, Audit Job results, Snapshot Job results, Patching Job results, Deploy Job results, job run events, job schedules, audit trail, and shared data (from generic assets and configuration objects generated during Snapshot Jobs and Audit Jobs). BMC Server Automation 8.9.02 also includes Old Version Component and Old Version Job as historical data.

This command runs using the default cleanup values for retention time. Default retention times are:

  • For job schedules, job run events, audit trail, and shared data: 14 days
  • For job results (of Compliance Jobs, Audit Jobs, Snapshot Jobs, Patching Jobs, and Deploy Jobs): As set by the RESULTS_RETENTION_TIME property, for which the default is 0 (no deletion of job data). For more information about the RESULTS_RETENTION_TIME property and how to set it, see To set the retention period for job runs.

As the default, no maximum duration is applied to the cleanup operation, and it runs until it completes or is aborted.

objectName lets you specify the type of object you want to clean up. Use one of the following values for objectName:

  • AuditResult
  • ComplianceResult
  • SnapshotResult
  • PatchResult
  • Deploy
  • AuditTrail
  • JobRunEvent
  • JobSchedule
  • SharedData

Return type : java.lang.Object

Command Input :

Variable Name

Variable Type

Description

objectName

String

The name of the object to clean up.

Example

The following example shows how to clean up audit results from the database.

Script

blcli Delete cleanupHistoricalData AuditResult

 

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