Last Sunday, I encountered a frustrating issue where my Home Assistant (HASS) database got corrupted. I suspect it was due to the recorder running out of space, as I noticed the ENOSPACE error before the crash. HASS automatically renamed the corrupted database and started a new one, but this left me in a tough spot. I noticed the issue half a day later when I realized the history was missing. I had to decide between sticking with the new database and losing my history or losing the data from the current day.
While I understand the trade-off between availability and consistency, I couldn’t help but think that a notification would have been incredibly helpful. It would have allowed me to act faster and potentially limit the amount of lost data. I ended up having to manually repair the database, which was a time-consuming process.
This experience made me think about how HASS handles database integrity. A merge or import tool could be a great solution to recover data from a corrupted database without losing everything. I hope the HASS team considers adding such features in the future. It would definitely make the platform more robust and user-friendly.
Overall, while I appreciate the automatic failover to a new database, a notification system or a more user-friendly recovery tool would go a long way in preventing data loss and reducing user frustration. I’m curious to hear others’ experiences and thoughts on how HASS could improve database management. Any suggestions or insights would be greatly appreciated!