History data lost

Hi all,

About 10 days ago we had a power outage. This is quite unusual in our region but it seems to have corrupted my energy history. My data before the power outage is lost.

In the config folder, I see a home-assistant_v2.db file, but also a lot of home-assistant_v2.corrupt files followed with a timestamp.

I read some topics on recovering the database with sqlite3 but it doesn’t restore my history data. It seems as if the home-assistant_v2.db file contains history since the power outage and old data is stored in the .corrupt files?
Any help is much appreciated!

If the database is corrupt, a backup is your best bet. However, being it is about two weeks ago you either lose the last two weeks by going to a backup or you need to merge data. For stuff like statistics this may not be easy.

Ughh, that would be quite annoying indeed. Any way to merge the two databases?