Clean up the Data Watcher MongoDB π
To clean up the Data Watcher DB launch the mongodb-cleaner.sh script, stored at:
$DATAWATCHER_HOME/dweventscollection/maintenance
Usage:
./mongodb-cleaner.sh [ last=10 | to=29/01/2020 | status | stop ]
Where:
last=n The cleaner will delete all data older than the number of days entered. E.g.: last=10 will delete all data that is 11 days or older.
to=DD/MM/YYYY The cleaner will delete all data up to a specific date. E.g.: to=01/09/2024 will delete all data up to 31st August, 2024. Data from 1st September, 2024 to the current date will be kept.
π queryFilter: The cleaner will delete flows specified according to the Data Watcher Query Language literals. See the How to run searches in Data Watcher page. The cleaner will act on the subset of flows identified by the specified query. Multiple values can be separated by OR and/or AND. If nothing is specified, AND will be applied. E.g.: queryFilter="Nasa[source] projects_Jan_2022[entity]" will clean all flows sent from Nasa with filenames projects_Jan_2022. Note that the searchscope (the attribute in square brackets) must be present or an error will occur. I.e., entering queryFilter="Nasa[source] projects_Jan_2022" is not correct.
status: It prints if the cleaner is running or not
stop: It stops the cleaner - if running
Logs:
The cleaner logs information at this path:
$DATAWATCHER_HOME/dweventscollection/logs/mongodb-cleaner.log
.
The history of the latest 4 cleanup procedures are saved.
Last updated