OpenEnergyMonitor Community

Data retention

Moved my EmonSD over to an APU4 and EmonCMS to have a bit more horsepower. In this process I am going through and cleaning up some things. One thing I was starting to think about was trimming old feed data that is >5 years. Was thinking maybe a cron job for it might work, but wasn’t sure if time could be triggered outside of the Emon interface. I had a cron job for backup which worked well before.

Edit - changed topic name to avoid confusion with the SSD function trim. BT - Moderator

Bueller. Anyone? I take it the Feeds Data Trim is not a script being called up. Went looking in the file system for that and that appears to be the case. Would this be a feature that might be added in the future where we could set a maximum data retained to be a set time period and it automatically annually will remove anything older?

It might help you to read in ‘Learn’ about the structure of the various databases.
Learn→Electricity Monitoring→Timeseries

Hello @Ryan_S

I would like to add this at some point, it’s not currently on the immediate roadmap but definitely something that would be good to have.

Sounds good. Not a huge space issue for me since I moved over from the Raspberry Pi to an PC Engine APU4 (had it sitting around). Have about 60GB of space so no concerns on it filling up for awhile. Just figure there is no point in retaining data over 5 years or even 10 years.