Unfortunately, I’m a victim of my own folly with no backups and using the SDcard for running Home Assistant on a Pi4.
The SDcard seemed to have died after or during an OS update, and is stuck in read-only mode. I tried cloning to another SDcard, but the same contents will not boot at all.
The only corrupt partition is the hassos-data partition.
Things I tried that did not work:
Attempted to fix the partition on a cloned card with e2fsck (hassos-data partition)
Flashed a new hassos then copied the fixed hassos-data partition over
Looked into the folders inside the hassos-data partition…
Within the hassos-data partition, I see 3 folders:
docker*
lost+found*
supervisor
*Needs root to view
However, I’m not sure where to look to find my HA config files to restore.
As title states, where can I find the snapshot locations or backups created on hassos for me to restore?
I think I’m getting somewhere… tho I might be worsening my system instead lol.
This is what I have found and done so far:
I found that the cloned image works!
I enabled ssh by following the debugging docs. I created a GPT (NOT MBR) formatted USB via Gparted and named + labelled the partition as CONFIG since I didn’t know if it was partition name or label that requires it…
Use a USB drive with a partition named CONFIG (case sensitive) formatted as FAT, ext4, or NTFS. Create an authorized_keys text file (without a file extension) containing your public key(s), one per line, and place it in the root of the USB drive’s CONFIG partition. The file must use POSIX-standard newline control characters (LF), not Windows ones (CR LF), and needs to be ASCII character encoded (i.e. mustn’t contain any special characters in the comments).
…
…
…reboot the device leaving the drive attached, which automatically triggers the import.
In the system, I ran ha backups list and found nothing… I guess I don’t have backups?
I am able to access the observer http://homeassistant.local:4357/ with no issues, but no luck on https://homeassistant.local:8123/
I ran a couple ha ... commands, but was met with an error
Error returned from Supervisor: System is not ready with state: setup
I ran the following commands:
ha banner works
ha supervisor repair works
ha supervisor restart works
ha available-updates works
ha available-updates works, but returns a blank []
Not sure what’s going on, I then figured… if it was borked during an OS update, could I re-install the OS again?
With my OS downgraded, I am still not able to access https://homeassistant.local:8123
http://homeassistant.local:4357 works tho…
I then tried to mess around with docker while I still have access with ssh:
docker exec -it homeassistant /bin/bash:
Error response from daemon: container 204c2252d5cad547a4f3d413ccf20ac3aa01998e7ec32a04c5f03d646a4c2a82 is not running
Well uhh… that’s not good. I have no idea whatever the container is with that long name, so I tried running a few docker commands to try find the container id.
docker image list not listed here
docker container list not listed here either…
Maybe… I can try running a docker command to update or overwrite a system thing to make this work?
Looking at the links listed under docker image list, maybe I can manually run a container using the links under the repository column?
Since I am downgrading and using a Pi4, I chose haos_rpi4-14.0.raucb.
rauc status - Check the current version and booted slot
reboot '0 tryboot' - My device was alreay on slot 1, so I changed the reboot to explicitly boot to slot 0.
After restarting into the downgraded slot, I now have a working instance of Home Assistant again!
However… I’m still curious on where the backups are located, as per the title. With a working system, I can now see my backup files with ha backups list, but where can I find it with ssh?
And follow up question: I had access to the /mnt/supervisor/homeassistant/ directory under hassio-data partition. I turned it into a TAR archive and tried to “restore” from it, but it wouldn’t work. How would I use the data to create my own TAR archive that the onboarding screen would accept?