Hass.io MariaDB Error after Snapshot Restoration

Thanks @truglodite, this solved it for me.

For reference, I was migrating from Hassio 32-bit (RPi 3B+) to a fresh Hassio 64-bit (RPi 4) and was having the MariaDB problems upon restore.

hi. i had to uninstall / reinstall to make mariadb works after a restoration, as well.

Not sure if anyone is interested, but I have restored from a snapshot today. All suggestions above didnt work (Im running 2021.5.3) and I kept getting multiple errors all relating to using MariaDB. Managed to fix it in the the end with the following (potentially not all stages are needed but thought I would record it anyways):

  1. Copy the MariaDB config out from Configuration page in Integrations.
  2. Remove MariaDB integration.
  3. Restart the host.
  4. Go to Configuration - Users.
  5. Reset the password to the one in point 1.
  6. Install the integration again.
  7. Paste the config in from point 1.
  8. Start MariaDB.
  9. Reboot HA.

I have been doing a lot of snapshot restores lately as I have been testing different configurations. What I have found that works consistently is:
1.Stop the mariadb prior to the taking the snapshot.
2. Restore (I usually see errors in recorder and anything db related.
3. After HA completes the restor, go to the mariadb addon and check that it is started. Mine has not been. Start it here
4. Reboot HA. This had worked the last 5 times I have restored.


@Townsmcp I followed the same steps and that got me back up and running again also, thanks.

1 Like

Works for me too, but we need a permanent fix for the problem.

I think the Devs should really look at this as the problem is already known along time. Only thing you can do is to stop mariadb before backup and before restore that should be easy with an automation bit restoring it without stopping it will fail in any case .never got a backup running directly without fiddling with mariadb .

Is there a github issue for this specific problem? Otherwise devs might skip this?

is there a permanent fix for this yet?
old data is important and deleting it is not a good fix :frowning:


some suggested to do partial snapshot and exclude MariaDB instead of full snapshot
i’ll test, and hopefully that will work.

Any progress doing a partial backup?
This is an annoying issue, lost all my data twice because I had to restore HA.
I might give Mariadb another try, and stop the process while backing up to see if that helps. I use Google Drive backup add-on, and there is an option to stop Mariadb (or other add-on) during backup.