Hi all - looking for some help here. About a year ago I got a Raspberry Pi 4 and setup home assistant. I use it to control my z-wave thermostats, door lock, wall switches and plugs. In general I had everything working great. I had configured remote access via duckdns and a certificate.
Yesterday, I was unable to connect to my home assistant anymore, either via local IP or via the duckdns external connection tunnel through my router. I power cycled the RPi multiple times no luck. I can’t SSH into it either. I can ping it’s IP locally, but that’s it. Unfortunately I don’t have a micro hdmi adapter so at this point I’m stuck. I assume HomeAssistantis just not starting.
Over the course of using it I did create several backups along the way, but without really thinking about it, I realize now that they are all on the SD card and only accessible via HomeAssistant(I think?).
I popped the SD card into my PC and I can’t make heads or tails of the content. Scan disk says the SD card is fine, but I can’t tell if it is what it’s supposed to be and if the backups are anywhere there. I attached a screen shot of the SD card contents.
My questions:
Is it worth going and buying an micro-HDMI adapter so I can see what the RPi is doing? Or chances are I’m stuck reinstalling HA at this point?
Any thoughts on what the most likely issue is? RPi hardware failure? SD card corruption? I did not install any updates recently so I don’t think that’s the issue.
Assuming I’m stuck reinstalling HA at this point, do I need to go through the full configuration again or is there a way to restore any of my backups? Is there anyway to get back all my scripts and automations?
Going forward, what is the best way to not be in this situation again? Is it to periodically snapshot the SD card onto my PC? Would it be as easy as copying everything off the card via windows explorer? And if I ever got in this situation again could I just copy and paste back onto the SD card from my PC? I imagine it’s not that simple. What is the correct way to be backing up HA?
Chances are its the SD card failing, can’t be sure. Best solution is to buy a usb ssd and install on that. Second would be install on a different SD card, or third reinstall on existing sd card with a plan to sort the issue soon.
First step is to copy all those backups to your PC, then install a fresh HAOS and on the landing page pick the latest backup you copied to your PC and sit back and wait, for an hour or so. Then once complete, setup automatic backups to a location that is not your PI.
If you don’t know your encrypted backup password, then you can retrieve it. Follow this post
Getting your system functional again
Get a new storage drive or sdcard. Install a new copy of HAOS on it.
Restore your system from an automatic backup via Settings > System > Backups. You will need to provide the password you recovered that was used to encrypt the backup.
Thanks for the response! I can’t seem to find any other backups. Unfortunately I can’t browse using the file system, only through DiskInternals so I’m stuck at the partition level. Any ideas where I can find the backups?
Try to open the tar file with 7zip. If you can open all internal tar.gz files then you don’t need a password. If 7zip has an error “not a tar file” or the like then it is likely encrypted. In which case you can find the password following my other post.
If you are serious about Home Assistant, buy a used micro-pc like the Intel NUC. They cost less than a new Raspberry Pi and will outperform the Raspberry in every metric. Best of all, no SD card.