Unknown Error, See Logs - Restoring Home Assistant

Recently I've got the following error when restarting hassio - still not quite sure why as the logs don't seem to point to anything obvious but doing a wipe and restore gets it back up and running.

Today I noticed that my IKEA TRÅDFRI lights wasn't responding so thought that perhaps IKEA had done an update and home assistant had lost connection so a quick restart of homeassistant would pick it right up!

core-ssh:~# hassio ha restart
Unknown Error, see logs

*facepalm* Great! the webui wont come back online but ssh/samba are still available to make any tweaks.

A quick google didn't return much in results - there was one suggestion by mikegrb on this community thread that it was related to hassio waiting for the web ui to come back online however the supervisor times out before this does around the 10 minute mark. This does make sense however the solution of renaming the /config/.storage/core.config_entries file didn't seem to work for me. Therefore I suspect there might be some SD Card corruption going on as a full wipe and restore had me back online!

Hello! Snapshots

Homeassistant snapshots are a great way to back up your entire homeassistant set-up including any additional files in your www / share directories, it can also backup all your add-ons and settings including node red etc so your back where your started.

Creating a Snapshot

From the webui you can navigate to the Hass.io panel then click the snapshots tab from the top. Give the snapshot a name and select a Full snapshot. After a few minutes it should be saved and visible below. If you have ssh access addon enabled you can also do this by doing the following command

# hassio snapshots new --name mysnapshotname

Now with the samba addon enabled you can just simply access the /backup/ folder and copy a snapshot to your pc for safekeeping or do some kind of routine backup procedure to cloud services / dropbox etc. That way when bad things happen you aren't back to square one trying to remember how you had everything set-up!

Simply download the latest image of hassio and burn to a new SD card or existing if you just want to wipe (remember to move the snapshots first!) then add it to your raspberry pi and let it run. After about 10 minutes you will be prompted to set a username/password on the local ip http://yourip:8123 or http://hassio.local:8123

When your basic install homeassistant is online you can install the samba add-on back in and configure, once setup you can drag over your snapshot from earlier into the /backup/ folder share - then on the webui navigate to the snapshots section - if you don't see the snapshot press the refresh icon on the top right and hopefully its there. Just select the snapshot and do a full wipe and restore. After a few minutes hopefully everything is back as it was!