#I don't think the sensor should have

1 messages ยท Page 1 of 1 (latest)

sick marsh
#

The database doesn't hold your entities or integrations

#

Your log file would have told you the problem

novel walrus
#

I still have the logs, nothing there

#

2024-03-29 19:11:07.037 ERROR (MainThread) [homeassistant.config] Invalid config for 'homeassistant' at configuration.yaml, line 82: 'sensor' is an invalid option for 'homeassistant', check: sensor
2024-03-29 19:11:07.037 WARNING (MainThread) [homeassistant.bootstrap] Unable to set up core integrations. Activating recovery mode

sick marsh
#

There's something there ๐Ÿ˜‰

novel walrus
#

thats the first restart when I had my config broken by the sensor, which was under the wrong section

#

Well ofc, and I corrected that and the next restart all integrations had disappeared

sick marsh
#

This is why you should always config check first

drifting haloBOT
sick marsh
#

recovery mode was probably your problem

novel walrus
#

Ok so recovery mode resetted something

novel walrus
#

I am running a docker installation, for context

#

I don't get it. Is it still running in recovery mode somehow

sick marsh
#

Doesn't matter how you run HA, you can still config check, and recovery mode still applies

#

After you fixed the config and restarted then things should have returned to normal

novel walrus
#

it didn't, because thats when the integrations had disappeared

sick marsh
#

Then you should check the log from that restart to see what the problem was

novel walrus
#

2024-03-29 19:12:29.827 ERROR (MainThread) [homeassistant.components.sensor] The filesize platform for the sensor integration does not support platform setup. Please remove it from your config.

was the next boots problem

sick marsh
novel walrus
#

Yes, check would have helped here as well ๐Ÿ™‚ But then I removed it from the config, and next boot did not contained any errors anymore - just no integrations

sick marsh
#

integrations (done in the UI) are held in a hidden folder, YAML edits can't break those

novel walrus
#

i removed both config entries I had added, and restarted HA now many times but still no integrations

sick marsh
#

That sounds like you managed to corrupt your config somehow

novel walrus
#

config 1:
homeassistant:

allowlist_external_dirs:

- /config

config 2:
sensor:

- platform: filesize

file_paths:

- /config/home-assistant_v2.db

sick marsh
#

And by config I mean all the stuff in .storage/

#

Not your YAML

novel walrus
#

yeah

#

i see lots of files in .storage which seem to relate to my integrations

#

It does try to load HACS

#

according to log, but HACS is not visible in the UI

#

oh well, I will try to recover the backup now. That does not seem easy either

sick marsh
#

Recovering a backup is as easy as extracting the backup to your config folder/copying the files back from the backup

#

All depends on how you take backups

#

Next time... maybe take them automatically, and more often

novel walrus
#

yeah, I usually take a manual backup via the UI before updating the HA docker

#

never had to restore one

sick marsh
#

Look into rsnapshot, urbackup, or some other proper backup solution

#

You should be backing up everything that matters to you, automatically

#

You should also be testing restores

novel walrus
#

I had duplicati at some point, but I never got it to work properly due to files changing while it was backing up. Even as I was trying to exlude the problematic files.

Fully agree with automated backups, and just last week I was thinking of adding the google drive backup destination but..

#

I do have a full machine backup of the docker host itself, that might also be a solution to just restore that. I have nightlies there

#

yeah thats a solid plan, i will create a new machine from the vm backup and just get the /config from last night from there

novel walrus
#

despite the "[homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly" I now have all my integrations back from last night at 02:00

#

PS: I got the same error when I tried to recover the backup created via the HA UI from 7 days back..

sick marsh
#

That's a normal error when you don't stop the database when backing up

novel walrus
#

Yeah I understand, and luckily it is not corrupted (it seems)

#

I am just surprised HA UI backup doesn't quiesce the database when a backup is created either

#

(not sure if sqlite even has quiesce functionality)

sick marsh
#

Backups for HAOS may do that, from memory

novel walrus
#

I might move back to a HAOS deployment for that reason alone. i recently (some months now) switched to run my docker host on proxmox and now I could easily manage haos as a VM as well

#

But, now I have a automation calling the backup.create service every day so at least I will have fresh backup

sick marsh
#

You can have it disable the recorder first and then enable it after

novel walrus
#

yeah thats a good reminder which I already forgot