Delete - cleanupAgent_1


Delete - cleanupAgent

Description :

This command cleans up old temporary files on a target server (agent). This includes old files that were created by Deploy Jobs in the Transactions directory (especially rollback files) and in the Staging directory.

Return type : java.lang.Object

Command Input:

Variable Name

Variable Type

Description

serverName

String

Name of the target server.

retentionTime

Integer

Retention time in days. The minimum valid value for the retention time is 3 days.

deleteCriteria

String

The attribute used for determining whether a file is considered for deletion.

Valid values are:

  • -c: The attribute used for determining whether a file is considered for deletion is the creation time. If a file was created within the specified retention time, it would not be considered for deletion. 
  • -a: The attribute used for determining whether a file is considered for deletion is the access time. If a file was accessed within the specified retention time, it would not be considered for deletion. 
    Note: Programs such as anti-virus and backups reset the access time when they run. Therefore, if you are seeing the files you expected to be cleaned up are not cleaned up, use other attributes (-m, -c) to achieve the desired results.
  • -m: The attribute used for determining whether a file is considered for deletion is the modification time. If a file was modified within the specified retention time, it would not be considered for deletion. 

For the deleteCriteria attribute to be used, both the Application Server and target RSCD Agent must be upgraded to version 21.02.01 or later. In versions earlier than 21.02.01, the default of access time is used.

Example

The following example shows how to to clean up temporary files on a target server named server123. -c indicates that files that were created 10 days ago will be cleaned up.


Script

blcli Delete cleanupAgent server123 10 -c

 

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