Is there a way to get a notification when de database gets corrupted.
I had a power outtage a few days ago, and the server rebooted after the power got back, no big deal.
But I checked the energy consumption today and I saw that I lost 1,5 year of energy data consumption.
Im a sucker for that data so I my heart screamed like a little girl.
Luckily I make backups every night, but now I lost 5 days worth of data.
Is it possible to get a notification at least? Now HA just renames the db as CORRUPT and starts a new db…
Would really appreciate a notification or some sort.
My Database got to over 4GB when it got corrupted. And triggered a daily outage. I don’t need/use history so I deleted it and everything is fine now… But it Would be nice if would could set a max DB size and have the OS prune old entries.
It does self-prune, but by time rather than by size.
If you don’t care, just set “purge_keep_days” to 1. You’ll still have long-term statistics (aggregated data), which use basically no space.
HA has stated that they prefer users to use the default sqlite over mariadb at the moment. Myself I had a corrupt message today as well. I managed to recover the corrupt db file and reuse it so I only lost todays information instead of all previous history.