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 concerning 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 :