HA Fails to Restore from Snapshot

Any help would be much appreciated. After suffering a 4 hour power outage, my HA system would not load frontend/lovelace webpage. I was able to access from SSH and command line, but no connection via IP address or http://homeassistant.local:8123 or the duckdns site. The frontend would not load locally or remotely - time out error. I was able to ping the IP address successfully. Previous system version 108.1. I assumed that the power outage may have corrupted the SD card or access tokens for the Raspberry Pi 3 Model B+ installation. Having a backup copy of a recent snapshot, I removed the SD card and did a fresh install.

The new install loads HA version 111.4. When I attempt to restore the backup via Samba file transfer, the system log shows
“ERROR (MainThread) [supervisor.homeassistant] Home Assistant has crashed!
CRITICAL (MainThread) [supervisor.homeassistant] Home Assistant update fails -> rollback!”

The restore only loads the Addons and none of the configuration files are included. The version remains 111.4. Possibly related, the new install auto assigns a static IP versus utilizing the routers manually assigned DHCP address.

Am I stuck having to completely rebuild my system from scratch? I can not seem to get HA to revert back to 108.3 via command line either. After a command line input ha core update --version=0.108.3, the system crashes and will not respond/load frontend from any IP addresses. Any suggestions on how I can recover my setup??? Thanks in advance!

Use a 108.3 image to restore with, then update? That would be my guess, but probably wouldn’t work since I think hassio is dl’d upon first boot. At the very least, I’d try manually copying config files over before doing things from scratch.

Did you try a ‘Wipe and restore’ ?

Thanks for the feedback! I tried restore as well as wipe and restore. I’ve flashed new install several times with multiple iterations. I’ve used old 3.11 and new 4.10, but none play nicely with my recent snapshot or even the version prior. I was able to revert the version back to 108.1 using console and verified based on “ha core info” report, but can’t access via frontend GUI web browser.

The latest new install no longer gets assigned a DHCP address, and therefore I can no longer even reach via web browser. Really dejected that backup is not working. Any additional advice or comments would really be appreciated. Thanks again for your feedback!

Thank you for the advice. I did attempt your suggestion, however every time I revert to 108.1 version, I lose access to front end. I fear that I will have to install addons and reset every configuration setting manually with the current version and then copy over all the config settings and various files. My setup was complex and will require significant time to reconstruct. Really hoping to avoid that, but may be my only option. I’ve spent 6 hours installing and trying to restore without resolution. Maybe it’s time to cut my losses. Any other thoughts? Thanks again!

No harm in waiting for some genius advice on how to get the restore to work. However, I agree after 6hrs of attempts I’d also be staring down the barrel wanting to redo the install from scratch. 6hrs is enough to copy over configs and addon configs. The no fun part is determining all the now unnamed entities to rename them… and not having typos so those pasted in automations still work. Most of us have been there with some major tech failure bro… we feel for you, and are by your side in spirit at least. :wink:

Thank you @truglodite. I was able to restore without having to rebuild courtesy of @francisp input. See below for details:

Frontend access required removing the external/internal_url JSON in the core file of the Config folder. There is reported to be a bug that prevents rollback versions >110.0 from functioning.

Also, the snapshot backup did not transfer all of the .storage files in Config folder after the restore/wipe. The solution was to manually transfer all the contained/missing files via Samba and then restart. I don’t know why they did not get transferred initially - probably some compatibility bug with the different supervisor/core versions. I did notice a partial restore flag in the logs, which could be explained now.

Thanks again for the feedback and moral support! No doubt, these are the pains we must all endure for highly flexible/customizable home automation. So glad to have it back working!!!