HomeAssistant Core deleted all integrations, entities

I added a NAS mount to my authorized directories in my configuration.yaml. This didn’t really help anything because HA won’t follow symlinks even to directories you mark as allowed. Anyway, I didn’t remove the directory from the config. My server did its weekly reboot last night and HA started in recovery mode because it couldn’t find the NAS directory. This is either an issue with the startup order or HA isn’t trigger the auto mounter. Seems like a bug that the directories in allowlist_external_dirs must exist for HA to start.

When I saw the issue, I removed the offending directory and restarted home assistant. It restarted fine, but every single integration, device and entity was removed. This was quite a shock.

Unfortunately, with HA core the built in backups don’t run automatically, and it’s been a while since I’ve created on of those. I have nightly server backups.

Why would recovery mode delete everything?
Is there anyway to restore everything without doing a system level backup?
Is is possible to make HA even less user friendly?

Use HAOS if you are worried about user friendliness. I would check the mounted folder for it contents, you might find the missing data there. If not restore your server.

I was able to successfully recover using a backup on my nas. Still, I think it’s a serious design flaw for it to delete everything following a “recovery mode”. I’ve been in an OS recovery mode countless times. When I reboot in normal mode I don’t find it’s deleted the file system.

I’d be in the same boat if I used the Container version and did the same edit to my config file.

I’ve HAOS, added trusted_users to config yaml, there was a problem with user_ids. HA went in safe mode, I fixed the issue, HA restarted “without problems” but now all integrations are gone. There’s no recent backup. Pain.

That’s terrible. Safe mode should be removed or called something like extremely dangerous mode.

I was fortunate to have a recent backup, but restoring it caused many of my cloud integrations to break due to key rotation.

I’ve literally just had this happen to me - Had a typo in configuration.yaml, went into safe mode, entire configuration deleted with no backup - Is this is joke?! It’s going to take me weeks to get this back up and running again!!!