Hello,
I have a problem with my HA database growing pretty significant since some month. After trying to figure out what might be the reason I’m even more confused than before and think my configuration might be messed up. Because I hope that my history data is still there, I wanted to ask for help before deleting anything.
The database started to grow mid january, as you can see in this graph. You can also see that there is no data before 19. November, so there is only 4 month of data.
I set up my HA over a year ago with MariaDB as internal database and InfluxDB for the history data. The database part of the configuration.yaml looks like this:
# Loads default set of integrations. Do not remove.
default_config:
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include_dir_merge_list sensors/
template: !include_dir_merge_list templates/
# Use MariaDB as internal database
recorder:
db_url: !secret mariadb_url
purge_keep_days: 120
commit_interval: 60
# Use InfluxDB as history database
influxdb:
host: !secret influxdb_ip
port: !secret influxdb_port
database: !secret influxdb_database
username: !secret influxdb_user
password: !secret influxdb_pass
max_retries: 3
default_measurement: state
include:
entity_globs:
- sensor.aussen_*
- sensor.... # some more sensors
entities:
- sensor.mariadb_database_size
- sensor.influxdb_database_size
- sensor.heatpump_power_filter
- sensor.... # some more sensors
On thing I noticed and messed up is that the recorder has no include/exclude, but at least a purge every 4 months. What would happen if I now add some includes like in the influxdb section. Will all the other, not included data be deleted at the next purge?
Do I need the includes in the influxdb-section when I already have those in the recorder-section?
In Settings > System > Repair and then on the …-menu it lists mysql as database-engine for the recorder. So I’m not sure if any HA update might have messed um the MariaDB config and I’m now having 3 databases in parallel?!
Is there any other way to track down what is causing my database to grow that much and any way to reduce it again?


