Issues after unclean shutdown

Hi,

I am using the Virtual Machine integrated Image of HoAss. Worked really fine over months. Now my hypervisor had a glitch and therefore the VM with HA was shutdown unclean.

Unfortunately, I am having issues with HA now. My Grafana instance will not start. I discovered the following error in UI:

grafik

Going further and checking the logs brought me to this:

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:217 
Integration: Recorder (documentation, issues) 
First occurred: 07:35:08 (1 occurrences) 
Last logged: 07:35:08

The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly

I can only see the supervisor logs, on all other logs (host, dns, etc.) I am getting “Forbidden: 403”, even though I am logged in as administrator.

May I assume something is really broken here? Is there a chance to recover?

I took several backups (HA internally) recently but I never tried to restore. Is the restore for the VM image documented somewhere? How about the add-ons like Grafana?

Thanks for suggestions!

/KNEBB

Hi,

my further research showed me a lot of similar issues with corrupted sqlite database. To be honest, trying to fix it in the described way seems to be -at least with hass.io av OS- a hassle. Instead, I copied the backup files from my VM to an freshly installed HomeAssistant on a Debian11.

Then I restored the backups from the last full one (from May!) step-by-step all partial ones. Had some glitches in between as the GUI did not come up after one restore. So I had to do it with the ha backup restore command on CLI. But in the end it worked fine so far and I got a running instance with all my sensors back.

The history of my data got lost (at least in Influx/ Frafana) but this doe not bother me.

As I moved to Debian I am now able to create a cronjob for future daily backups and backup these through rsync to a remote location. Ways better!

/KNEBB