Much to my surprise I discovered that a restoration of a full snapshot would not fully restore the HA to a full operational state.
The short story: It seems to me that the Full Snapshot dismisses add-ons.
The long story: I wanted to migrate to a faster SD card. I made a Full Snapshot, downloaded and saved it locally, made a fresh HA installation on the new SD card, uploaded the Full Snapshot (CLI), made a restore just to find that none of the add-ons were available.
Sometimes, the best that can happen is to be completely wrong as I was.
I started it over (migrating from SD to boot and run HA from an SSD/USB on my Rpi3+) and I can confirm that a Full Snapshot is a full snapshot that is, it recovers the system 100% including the add-ons and their configuration.
Yes, it is a full snapshot and can restore the full system if the snapshot doesn’t have errors: my automatic full snapshot for example miss the folder “homeassistant” the 70/80% of the times and for that I have a backup every day.
I keep having the line in the log:
WARNING (SyncWorker_12) [supervisor.snapshots.snapshot] Can't snapshot folder homeassistant: [Errno 2] No such file or directory: '/data/homeassistant/home-assistant_v2.db-shm
That is strange because I see in the source code that files ending with “*.db-shm” should be excluded in the tar file as it is defined by:
20-05-10 11:58:49 INFO (SyncWorker_6) [supervisor.snapshots.snapshot] Snapshot folder share done
20-05-10 11:59:12 WARNING (SyncWorker_7) [supervisor.snapshots.snapshot] Can't snapshot folder homeassistant: [Errno 2] No such file or directory: '/data/homeassistant/home-assistant_v2.db-shm'
20-05-10 11:59:12 INFO (MainThread) [supervisor.snapshots] Full-Snapshot 25ec3bff done
So, the “full” snaphost misses the “config” folder (hence the very heart of the configuration!).
Currently testing hassos vm on proxmox. I had the same behaviour on hassio generic install VM.
In the latest update (don’t remember if was version 109 or 110) they fixed the problem, now full snapshot is working correctly, great job, thank you (whoever fixed it).
I have a full snapshot on PC. Are there instructions available how to recover the failed system with this snapshot? I’d hope that I can just (somehow) utilize the snapshot and copy it uncompressed to the sd card. And life would be back to normal again
If you have a working system and just want to revert a few files you can extract them from the snapshot (it’s just a compressed archive) with winrar, winzip or similar. Then copy the over your existing files.
However if your system files are corrupt the best option is to:
Create a clean install
Install SAMBA or SSH
Copy across the snapshot
Press refresh in the snapshot panel (top right of the window)
@tom_l Thanks for the instructions!
Basically simple, as you explained, but it took 6 hours to get it back up.
Evidently the sd card was gone for good, took about 2 hours to figure that out. Could get it detected, occasionally for a moment, but then again it disappeared. Tried and tried with that before understood to go and get a new card. Card was only two months old and came with Pi4.
New card -> fresh installation -> copying the old backup file to the card (using both ssh and file editor add ons) -> recover -> done. Well, in between several reboots and small things to get fixed but all is back AND very happy about that.
Now looking forward getting that SSD installation done.
Here a full backup. Size is 59MB, but have lot of Add-Ons and they are much more then 53MB.
Is this normal? Only save the configuration part and will download the Add-On from source to save backup space?
I think so, because if you restore a snapshot on a different architecture ( pi -> intel/amd) the add-ons are restored too. And the existing add-ons can’t run if they are not downloaded again.
Sounds interesting. And once in a while you do a dB dump action and backup that one?
But I use the MariaDB Add-On… So have to check where I can change the path for storing dB files