Hass.io won't boot. How can I recover my configuration files?

I installed Hass.io using the provided .vhdx for Hyper-V over a month ago. A couple weeks ago, the web interface stopped working. When the VM boots, it spews out this line:

[FAILED] Failed to start Docker Application Container Engine.
See 'systemctl status docker.service' for details.

Then it prints a bunch of [DEPEND] failures for every docker container that fails to start. I can’t even figure out how to run systemctl since the Hass.io shell is incredibly limited. I haven’t found anything helpful from Googling around. The only people who’ve hit this error that have been able to recover their current configurations were running on rpi’s so they could just drop their SD card into a Linux instance.

I’m more interested in just figuring out how to backup my configurations. Naturally I just got everything settled and was starting to learn how to back up my configurations to github. Before I was able to successfully push, however, Hass.io stopped booting.

I can’t find anything on how I might recover my configuration from the Hass.io shell. Can anyone point me in the right direction?

If you have the Samba addon installed you should be able to mount the config directory and retrieve the files.

If the Docker application engine did not start then the container with the Hass.io shell is not available either.

Unfortunately (for me) I didn’t set up Samba nor SSH. With the web-based Configurator add-on, I never had the need for the others. I have access to a shell, I just don’t know what it is. There are very few commands available (mostly directory traversal and some basic boot stuff), but I can’t run any system level commands to check statuses on daemons or anything.

I get the feeling my Hass.io instance is toasted…

With shell access even if you found the files how do you plan to retrieve them? The only way I can think is to cat the file and copy paste to a local file.

Well, with a typical full blown bash shell like I’m used to, you can do a whole lot to back up the files (scp/ftp/samba/etc). I don’t know anything about how Hass.io is setup, and only learned because of this failure that it has a shell accessible from boot, but doesn’t seem to offer much functionality that could help me. But, being a complete noob, I though I would ask to see if there was something that could help.

Scp ftp and Samba are not part of the bash shell. I think cat is though.

For hassio I know that ssh which I assume includes scp is installed as an addon in a separate Docker container. The same is true of Samba.

Technicality humor is the best humor.

Yeah if the Docker engine won’t fire up, I don’t imagine any of that helps me. I’m just going to put in the leg work to start over and make sure I’m more diligent with backups this time around.

Thanks, though.

You can take the SD card, and try to mount it on a Linux system or VM. When I played with it on a test system, I was able to mount /dev/sdc and change to the /supervisor/homeassistant directory. As best I can tell, this maps to the /config directory in hassio.

1 Like

The OP has a Hyper-V VM that died. I really doubt it is on an SD Card :smiley:

1 Like

:slight_smile: I missed that bit. Typically it is a SD card that people are fighting with.

Still, the logical disk from the VM should be there, so it could be mounted in pretty much the same fashion.

1 Like

Good idea!

Set up an Ubuntu VM & mount the Hassio disk. That should give enough access to copy files, if the file system is reasonably intact. You may need to fsck it first.

1 Like

I realized I left out some key info… the logical disk is heavily partitioned. It should read /dev/sdc8


That definitely sounds promising! I saw some other posts about using the SD card from a Linux instance to recover the files, but didn’t think that could help me. I didn’t think about just adding the .vhdx to a new Linux VM as a secondary drive. I think that could work, thanks!

Good luck. Let us know if it pans out.

That worked perfectly! I created an Ubuntu Live VM and mounted the .vhdx of the busted Hass.io VM. All the partitions showed up in Nautilus and I was able to copy them to my file server over the network.

Currently setting up a new Hass.io instance on a RPi 3 B+. Thanks everyone for the help, this will save me a ton of work!

Now remember to back up your important data :wink:

Backups are for chumps :sweat_smile:

And here I thought the chumps were the ones who ask how to recover their important data that was not important enough to backup. :wink:

And you would be wrong :upside_down_face:

Hi. I had the same errors coming up. I assumed it was because we had a sudden power cut that it would no longer boot…I read the card on my Ubuntu install to find that it is full!!! Specifically it was the home assistant recorder database that was taking 28gb of space!!! I simply deleted this and everything booted just fine.

1 Like