It would be useful if LMT had a script, an option to lmtsh, or an option to lmt_agg.cron that would clear raw data which is older than a certain date. Perhaps this could be in the form of a shell script that can be run manually or set up to run as a cron job.
I was thinking a shell script that executes a bunch of MySQL commands like this one would do the trick:
mysql -p$(cat /etc/lmt/rwpasswd) -e "DELETE MDS_OPS_DATA
FROM MDS_OPS_DATA INNER JOIN TIMESTAMP_INFO
WHERE TIMESTAMP < '$TIMESTAMP';"
Of course the actual shell script would need options for which data tables to clear and the time frame to clear. @morrone please advise whether this is a reasonable addition to LMT. If so, I will create this script and its documentation and issue a pull request.
Other options considered: