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/2020 will delete all data up to 31st August, 2020. Data from 1st September, 2020 to the current date will be kept. - 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.
Updated 12 months ago