The subject says it all really.
For background, I’m running HAOS in a VM on Linux. I update everything as soon as the update is released. This morning I noticed that all my history was gone - it was like I installed Home Assistant at 4AM today, when it’s actually been running for several months. I did some reading and found that it was probably due to a corrupted database. As suggested, I checked my logs and sure enough found the log entries pointing to a corrupted database. I tired following some of the recovery tutorials but got errors about missing tables in my “corrupted” copy of the database. I gave up and did a restore of “Settings and History” and this worked. I now just have a gap of about a day in my history, not a totally missing history.
While reading for help to fix this issue I saw some people say that it’s all SQLite’s fault and they migrated to MariaDB. When I started searching for maybe a tutorial on migrating from SQLite to MariaDB all I found was people having trouble with their MariaDB implementations.
Is there a tutorial somewhere on creating a robust database configuration for Home Assistant? My setup is still new/small and losing my history now is not a big deal, but I can imagine that in the future I might be quite upset to lose years of data.
1 post - 1 participant