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:
MAP_FOLDER_EXCLUDE = {
FOLDER_HOMEASSISTANT: [
"*.db-wal",
"*.db-shm",
"__pycache__/*",
"*.log",
"OZW_Log.txt",
]
}
So why keep having that error ? Anyone have this behaviour ?
Regards,
Michele
Same here…
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.
GV
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)
- Recover from your snapshot.
@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.
I am still having this error. please advise what to do.
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.
Including MariaDB should save the database data though. I suspect that should be larger than 59MB.
Or maybe it doesn’t anymore. Restoration was always problematic.
Yes MariaDB is always pain in the …
I think you need to stop the Add-On first then backup. When restore maybe it will work.
Now it always say the dB is corrupt.
Still does not explain why your backup is so small.
dB is growing so will test it after a day. Will see what happen.
A solution I used, from this Community topic, is to move the database folder outside the configure directory.
Edit: I actually did move it to the share
folder, wasn’t aware that it was backed up as well. Note to self: test restore;)
Thanks seanomat!
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
There does not appear to be an option for that:
Option:
databases
(required)Database name, e.g.,
homeassistant
. Multiple are allowed.Option:
logins
(required)This section defines a create user definition in MariaDB. Create User documentation.
Option:
logins.username
(required)Database user login, e.g.,
homeassistant
. User Name documentation.Option:
logins.password
(required)Password for user login. This should be strong and unique.
Option:
rights
(required)This section grant privileges to users in MariaDB. Grant documentation.
Option:
rights.username
(required)This should be the same user name defined in
logins
→username
.Option:
rights.database
(required)This should be the same database defined in
databases
.
Indeed…
If you move it to the “shared” directory it is part of the snapshot.
NOTE: As of fall 2021, hassio.snapshot_full
has been renamed to hassio.backup_full
, be sure to update your automations