Restore snapshot when there is no cli?

I was changing my configuration.yaml when the electric power of my home went off suddenly. Due to that, I get now a beaufull 404 error on hassio cli. But the system is working fine on the background, I can turn off and on my lan devices, with Google assistant (I have linked it to my home assistant) . So, is only the web cli. I have some working snapshots I did before the power went off, but I can´t restore it because I can´t open the gui. I have hassio working on a RPI4 with last raspbien (buster) and hassio on Docker. I can access by samba to /config dir, or directly to the RPI operating system… how can I do to restore the snapshot? hassio sn restore -slug command don´t work on raspbian buster and I have no idea how to send it to the hassio container

The ‘web’ is not a command line interface but is a graphical interface.

Start a new installation and then restore the snapshot, you did back the snapshots up to an external drive didn’t you ?

Did you install ssh, ssh is pretty resilient and works when most things don’t, you could try copying the backup folder contents to a network accessible drive (if you had bothered to set one up (I don’t so I’d be screwed, but I copy the snapshots anyway)

2 Likes

Because those commands should be run within the container.

Docker is a wonderful tool. You can very easily docker exec into the container that’s running.

1 Like

If I write Docker exec I get an error:

sudo docker exec 19d9542988aa hassio sn list: 
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"hassio\": executable file not found in $PATH": unknown

No, I didn´t change the default snapshot dir, and didn´t copy the snapshots to an external drive.

What container are you running this command in?

1 Like

I tried homeassistant/armv7-hassio-dns:1
and homeassistant/raspberrypi4-homeassistant:0.103.4

I am assuming hassio commandline is included with hassio installation, rihgt? Isn’t a plugin or something to install apart, right?

Have you tried the supervisor?

1 Like

Yes. Same error. It seems commandline is available only if ssh plugin is installed and up… I think the only way to fix this is delete all hassio related containers and reinstall it again.

This is why I prefer straight docker and home assistant…

Can you install portainer
See if that will get you in.

1 Like

I gave it, but the problem isn’t get access to /config folder, I can do it by samba and RPI terminal with Docker commands… the problem is hassio commands don’t work at all. It seems to be part of ssh plugin… I will search for that info later, but now I will delete all containers and images and reinstall hassio again. I hope at least I can recover my last backup (I moved backup folder to an usb pendrive before remove the hassio containers)