Restore after re installation

Good morning,
due to SSD failure I had to reinstall everything and recover a backup.
To my surprise, it appears that the restore did not recover everything in the bd.
In fact I have lost all the history of the energy panel.
Did I do something wrong?

Giuseppe

No. The database often gets corrupted during backups. There is work being done to rectify this.

Many thanck,
then the database is not present in the backup, or is it present but damaged?

Giuseppe

Present but damaged. You may be able to recover it. There are topics about “database repair” on the forum.

Many thanks

One question, but at this point why not set the use of mariadb as the database for homeassistant by default?
The backup could be done with a simple script

Giuseppe

It has the same issue.

Tom,
do you mean that even a restore of a Mariadb db presents the problem of the corrupt file?
I have decided to implement mariadb on my hassio, the backup of the db I do it to an external script that runs on my pc, not on hassio.
Now I try to restore tonight’s backup on a pc where I have Mariadb installed.

Giuseppe

Yes. Unless you stop the database addon before making the backup.

I just tried to restore tonight’s backup on a pc, not my hassio.
The restore was successful and the check of the db gave a positive result for all the tables.
I repeat, I start the backup from a PC external to my hassio, it is a PC on which I have installed a Mariadb server.
For now, I keep everything monitored.
Thanks in any case for your availability.
Giuseppe