MariaDB addon or external server


I’m currently running Home Assistant as a VM in Proxmox. I have little to no issues with the current SQLite database, but it is starting to take some time to open up the history tab and I’ll be adding extra stuff later on, so I wanted to make my setup future-proof. I think it’ll be better to store data in MariaDB but I’m not sure if it would be better to use the addon or a separate instance (in Proxmox or on my NAS).

What will happen if I update Home Assistant, but I have to revert to a backup in case of a serious bug? With an external database, my data will be kept, but it might not be compatible with an older version of Home Assistant. So database and HA backups should be kept together somehow.

If I stay with SQLite or use the addon, data since the last backup will be lost I guess if I need to revert.

What would be the smartest way to set this up? How are you guys managing data and backups?

Thanks for your advice!

I use an external server, if I used the addon then the database would be included in full backups. Since my MariaDB database size is pretty massive as it is - around 4-5GB. Then I would rather not have that inflating the size of backups. In the event that I have some catastrophic failure, I’m more than happy that I can restore Home Assistant from the Google Drive backup add-on, and if I lost my historical data, it’s not the end of the world.

There are ups and downs to both. I opted for having my MariaDB on the same system as HA so I didn’t have to rely on two systems to run my home automation. My backups are larger but disk space is cheap so I’m OK with that (I have a 256GB SSD for HA plus all backups push via Samba to another system).

I strongly considered a second system for the DB but then wrestled with “what if the DB server is down?” At least if HA is down, so is the DB so there won’t be a deluge of problems.

In the end it’s probably 50/50, I can’t find any more faults using one system than I can using two.

I don’t use add-ons so that point is moot. But I do use MariaDB.

I run both HA and MariaDB in Docker on the same machine.

Kind of the best of both worlds.

Also using HA/MdB in one docker, the only issues I had were in the restart of the machine…if MariaDB container does not start quick enough then HA will fail, so I recommend to add some dependency (or delay). My db is just 2.5Gb and tracking usage mem/cpu, hardly ever beyond 5%

Thanks for your insights. It’s still difficult to choose. If the database structure is stable, I think I’d go with an external server. Otherwise, the addon is probably the easier solution. I guess the addon will be running before HA is started?

Maybe late to join the party but having thoughts on this. I am running HA as a docker now with all sorts of other docker container talking to it vise versa. Fine if you want to be a system administrator at home, but slowly getting fed up with it (backup is a nightmare to setup).
Now looking at ProxMox with HAOS as a replacement and a seperate DB would be problematic if you want to test something in a temporary VM. Two instances talking to the same database is a nono. With that in mind I am going to opt for the MariaDB addon, which will fully seperate instances.
For the same reason I would like to keep Zigbee2MQTT and Zwave 2MQTT as a non addon instance.

Should not be, I am using duplicati which does incremental ones. I am not sure what HAOS will reduce on Sysadmin stuff…a bit it would I guess as you have all under one page but add-ons are also containers