After an update I was made aware of the fact that I lost data from my energy-board. After searching google and this forum I wanted to apply the following steps:
- Stop HA via the SSH CLI using
ha core stop
- Move the database-file to my windows computer using samba
- download sqlite CLI for windows from https://www.sqlite.org/download.html
- perform
sqlite3 ./home-assistant_v2.db_old ".recover" | sqlite3 ./home-assistant_v2.db_fix
- move the new db-file back using samba
- rename the db-file (remove the
_fix
part) - re-start HA via the SSH CLI using
ha core start
But in my case there are some issues to deal with:
-
If I want to copy paste the database to windows I get the follwing error:
Why do I get this error? I can see them there! -
I have 4 corrupted databases (2 power outs and the other 2 I don’t know why they are corrupted), is there a way to combine/merge these if I have recovered them?
As an alternative I have HA running on an ubuntu setup with virtualbox as a VM-machine where HA is running in. I’ve read this site where he talks about login to the HA-box or VM. Does he mean that I have to login as root using port 22222? I have managed to get port 22222 open and I can login to the host using putty, but when I want to install sqlite3 on the host HA comes back with erros complaining that apt or sudo isn’t installed.
Stupid me hasn’t checked if HA made backups on an regular basis so my last full backup dates from january 2022.
Could someone help me with this complicated issue (for me at least )?
Thanks in advance!