As a Community user, please refer to the manual purge guide.
Automatic Houskeeping brings the ability for the controller to automatically delete Executions based on a “Time To Live” parameter, meaning a default maximum retention period. In addition to simplifying the user’s life, automatic houskeeping ensures that both deleted and remaining entities are handled in a coherent way and that no orphan objects are left behind.
The following entities are automatically deleted when an execution is deleted:
The entry corresponding to the execution in the execution table
The execution report including the generated attachments
The keyword measures
The plan at the origin of the execution if and only if it is an ephemeral plan originating from an external repository (ALM, Jira, etc). Plans of the Visual Plan Editor are never deleted automatically.
Housekeeping is available as of v3.11.
Enabling automatic houskeeping
Go to your Admin view and click the Houskeeping entry from the Settings tab. All you have to do is check the “Enable housekeeping” checkbox.
Time To Live
The setting TTL of Executions [s] decides for how many seconds past executions will be kept. For instance, if you execute a plan today and set a value of 86400 as a TTL, the execution will be deleted tomorrow (24 hours later).
Automatic Housekeeping relies on a scheduler entry which is configured to run every night at mid night. To change the frequency or time of the housekeeping routine execution, go to the Scheduler view and edit the properties of the Housekeeping entry:
Retaining specific executions
Users can now cherry-pick executions one at a time in order for them to be retained and ignored by the housekeeping job. All you have to do is check the Retain this execution box in the Archiving section of your execution as demonstrated on the following screenshot:
Additional comments can be written in the Description text area.
Job execution example
In the following series of screenshot, you’ll see a run in which only one execution had been retained and all others were removed:
If your database grows too much and you want to get rid of all the old executions and performance metrics, you can drop the whole database then re-import only your work, which is the fastest way to execute a purge.
Follow below steps :
Idea is to execute a backup of the current months collections executions, reports and measurements in order to clean up the database from the previous executions. Let’s say we are currently in October and that we want to remove all data related to executions done before that month. We will first export the executions executed from 1st of October.
First get the timestamp as NumberLong format we will use to perform our queries. Connect to your database and run the following command :
NumberLong("1506816000000") # This is the result we need
> exit # Exit the database
We can now export the executions, reports and measurements using following commands :