I just migrated a docker based installation to HAOS by configuration backup and restore. That broke the recorder because the docker project used a PostgreSQL database, apparently.
After I removed the responsible lines from configuration.yaml everything worked again - I was not interested in keeping the history.
But that sparks the question: is HAOS really using SQLite as a database?
Reason for asking: about every closed or open source product I installed in the last years (I am a systems and network engineer by profession, not much of a developer) comes with a warning in the docs that I can paraphrase like:
“Product X ships with SQLite as the default database. This is not recommended for production use. Refer to our documentation on how to set up a connection to a ‘real’ database server like MySQL or PostgreSQL.”
So I am a bit concerned why HAOS ships that way (if that is indeed the case).
Yes it’s default yes it ships that way. Yes you’re welcome to change it to engine of choice.
Home assistant is not designed for enterprise 5-9’s it’s designed for the home. (Frenks words) So we need to take ‘production’ with a grain of salt.
They even went through a dB optimization exercise last year and significantly improved performance in most cases… Could it be timescale, some of it yes could it be (insert engine here) yep. It is what it is and the user is welcome to change it if they wish.
Meanwhile my stupidly complex install is humming along nicely on the defaults and has been incredibly robust for as craptacular as I treat my dB platters.
Sqlite warnings in other software packages comes from the massively parallel use cases these usually present. If you can properly serialize writes without incurring long wait times, it’s one of the most solid database solutions out there. You can read up where sqlite themselves think they are suitable and where they aren’t here.
Isn’t the point of HAOS that you do not change anything under the hood because it’s an appliance style OS and you get UI triggered updates of everything, not only HA?
I’m running my two production instances with sqlite from the beginning (7 years) without any problem so far. I had no need to restore any backup, except for testing the restore.
Appliance - like. Not appliance. You can still change it. There are well known configurations for things like mariadb, postgres or Influx if you have that much data. If you want pretty graphs. Look at graphana not the builtin… It’s good enough.
Its appliance like ships with a config that satisfies the vast majority of users and is flexg enough to move where you want it in a supportable manner if the defaults don’t cut it.