Hi,
i recently got an issue with my energy dashboard not showing historical data from 5am back.
Firts thing i did was restoring a backup form a week agoe and had my data back BUT(!!!) only until the next day where all my historical data again disappeared from 5am on backward.
The size of the database did not change - so i assume the data is still there somehow but it is not showing.
Has anybody got an idea what i could check or do to make it work again?
Thanks!
Database housekeeping starts around 4:13am. Your data may be getting purged too early because of incorrect recorder settings.
What historic data are you expecting? How are you accessing it?
Don’t you have a home-assistant_v2.db.corrupt* file, indicating that the db was reset?
Is it only on the energy dashboard, or all your sensors??
I found a “home-assistant_v2.db.corrupt.2026-02-21T03:14:04.158552+00:00” file.
Missing history data applies to all my snsors.
But what does that mean?
Why is my database getting corrupt/reset each night after i restore the backup?
Is your backup already corrupt?
Just because the file can be backed up, restored, renamed, etc, does not mean the internal database integrity is preserved.
The internal pointers, tables, actual data itself can still be faulty even though the file itself may be intact.
There should be entries in the respective logs. Please quote them in correct </> forum formatting when posting them.
Hi guys,
thank you all so much for your help!
I could finally get it working again by repairing/recovering the corrupted database using sqlite3.
![]()