Hassio stopped working (without reason)

I could read it on my linux setup.

Where should the snapshot be, exactly???

I’ve had access to the old sd card, using a linux setup… where should I look for the saved snapshot file??

Please advice on how I can recover it from the old card, and copy/move to the new installation.

Thanks a lot!!

If you are using home assistant supervised, they are in /usr/share/hassio/backup. If you are using home assistant OS, I don’t know.

One other question… I had my home assistant connected to Nabu… no backup snapshot over there?? Excuse how naive I might sound… but was hoping there might be a way to find the backup online somewhere!

There are some add-on that upload your snapshots to google drive , Dropbox, … There is an add-on that uploads your snapshots to a samba share. But of course you need to use one of these.

After following the directions here: https://unix.stackexchange.com/questions/509973/mount-ext4-disk-cannot-mount-dev-sdc-read-only

…was able to find two .tar backup files (I guess and hope!).

I’ll try putting them on the same directory within the new sd card. Will let you know.

Got the files on the new sd card, and was able to “restore” de snapshots… the web interface is not alive yet, although I was able to access the samba share… a (good) beginning, I’d say.

I’m rebooting now.

Samba is available, but the web interface is not.

What could I try now???

Thanks, again!

It seems to be back online… but no configuration files were restored. No home-screen, no automation, no much.

Is there something else I should try??

I had my system shit it’s self too several weeks ago (power went out came on, all good, went out again then again a 3rd time during reboot corrupted files I guess🤬) I bit the bullet and just re did it all again with a fresh install. was faster than trying to recover it in the long run.

As soon as I was done getting back to my former state I made an image of the SD card and swear I’ll take more frequent snapshots.

And move them off the SD card.

Nope. Not automatically via Nabu Casa. One simple way to automate this however is to install the Google Drive backup add-on, or the Onedrive one, or whatever. I use the Google Drive add-on and it works perfectly

1 Like

You’re probably right… but at least the light switches are up already!

Will have to put a bit of work on it over the weekend, I guess: none of the display customizations works.

At least, I’m back!

Thanks everyone for the input!!


Advancing, advancing…

…BUT history and recorder are not working. Any ideas???

I had never seen anything related to recorder configuration… and I’m guessing my history sensors will not work until the recorder is up and running.

Cannot seem to find any error messages related to the recorder not working, but that it is not actually running.

Your help would be again appreciated!

The database rarely survives a restore. Delete it and restart.

1 Like


What is its name, and where is it??


The default database engine is SQLite which does not require any configuration. The database is stored in your Home Assistant configuration directory (’/config/’) and is named home-assistant_v2.db .

1 Like

Assuming you have not changed the default, should be a file in your config folder next to your configuration.yaml file and named home-assistant_v2.db.

Reading through the posts I’m not entirely sure anyone clearly explained what actually happened to you so wanted to make sure you were aware. Your sdcard got corrupted because sdcards have a limited lifetime when it comes to writing data. If you use them as physical storage for an I/O intensive application they will eventually die and need to be replaced. HA is an I/O intensive application and because of that if you search for ‘sdcard corrupted’ you will see plenty of similar stories.

I tell you this because if you don’t change anything other then plugging in a new sdcard you should be aware that this will happen to you again eventually. The HA team has been making major improvements in DB size and performance so it may take longer this time but eventually it will happen.

@tom_l has published a great guide on how to extend the life of your sdcard by reducing some of the chattiness here that I would definitely recommend taking a look at.

Also boot from SSD support has recently been added to RPi4 so I would highly recommend looking into that. Using an SSD instead of an sdcard not only prevents this corruption issue it also should significantly improve performance in general. If you are in a supervised install now would be a really good time to look into that since you have to rebuild anyway. If you are using Home Assistant OS then I don’t think you can make this switch yet but I believe this issue is the one to follow for updates on that.


Thank you so much! Very good information you’re giving me.

I don’t actually know the difference between Supervised and HA OS. Would love to know!

I could eventually use an ssd drive over usb, if required. But I don’t want to move from Raspberry Pi (3B Plus, now), as it looks nice and clean :wink:

(Deleting the DB was key to make it alive again, I have to say!)

@Matias_Orchard I know this doesn’t help your current situation, but I found that having my HA install on a Pi to be WAY more hassle than it was worth. To start with, I found it too slow - not a major issue, but it got on my nerves. Secondly, SD cards can and do corrupt more than other mediums, as you’ve found out. Most importantly, I found that when I came across a situation like yours it was too much of a PITA to restore. It’s not that I couldn’t do it, but it took more than 30 seconds - which let’s be fair - is a PITA. I have wife approval and family time to consider - I can’t waste time fixing something that should be working. The obvious solution for me was to virtualise it. I have my HA in Proxmox on a dedicated little i5 box and if anything goes wrong I simply restore a snapshot. I’d like to say that updates killing something is a rarity, but unfortunately it’s not. I recently updated the supervisor and I lost the web UI. I just restored from a snap and I waited for the next supervisor and installed that instead. I was back up and running in 30 seconds. The snaps are automatically backed up to a ZFS array on another server. I always snap before any updates and/or changes and I snap afterwards when known good, too. This approach has DRASTICALLY reduced the amount of time I have to spend fixing things. I know this is not a unique approach, many people do this. Some other good suggestions have been mentioned here (like using an SSD with the Pi 4 by @CentralCommand) but I am just mentioning the virtualisation option because I have been in your position and if this really got on your nerves it’s another option for you. IMO it’s way superior to any Pi solution and the inbuilt HA snaps because you literally preserve everything exactly as it was when the snap was taken. Ie. no deleting dbs etc.