Hi,
open the page set up old DB and new DB click RUN but nothing happend.
Can you help me?
Thanks for this tool. Has anyone recently tried the provided scripts?
My sqlite Home Assistant database is in a bad state and long-term statistics are not automatically calculated anymore. I would hate to loose a year of past data.
I havenāt used this tool for quite some time now since Iāve made it as I didnāt need it anymore. @arough mentioned it worked for him a month ago so I assume it should still work as intended.
Hoever, Home Assistant did change a lot overtime so it could be that the script needs an update. Anyone is free to make a pull request for an update!
Thanks for your reply @jory! I managed to fix my problem in the meantime with a little bit beginner SQL fu. It was probably caused by a migration that did not finish properly. I will save this thread though and come back to it, should the need arise.
I tried the tool again (my db keeps getting corrupt ) and have the same problem as the others.
Clicking on run seemingly does nothing, but creates copies of the newer database and appends _new-${timestamp}
.
I went back to the version of the PHP container I used when adding docker support to exclude docker as the error. Nothing changed.
Sadly Iām no jQuery guru and canāt figure out why nothing happens when clicking āRunā.
Just to give an update on the topic:
Iām blind and do get an error in the network tab.
SQLSTATE[HY000]: General error: 11 database disk image is malformed
.
I managed to fix it manually by dumping and reapplying the database.
Iām now adding a check and fix for this particular error to the tool.
At least Iām trying to
Hmm, when I try to merge I got this error for āinit_statsā:
SQL Exec: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: statistics.metadata_id, statistics.start_ts
Any idea to fix this?
When I understood it correct, the error says, that in the columns metadata_id and start_ts are no unique data. But in my opinion the only unique data column should be id.
At the moment I have daily a corrupt database and do not want to lost my energy dashboard statistic. All other data does not matter.