Full Snapshot is not a full snapshot

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.

Mine shows local add-ons in my backups and they have always worked. Are yours not there or does the restore fail?

Stupid question: did you restart after the restore?

Yeah addons are definitely restored. I had to change to a partial snapshot and remove some of mine to reduce the snapshot time.

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 :sweat_smile:

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:

  1. Create a clean install
  2. Install SAMBA or SSH
  3. Copy across the snapshot
  4. Press refresh in the snapshot panel (top right of the window)
  5. 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.

1 Like

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 … :slight_smile:
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