Hi everyone,
Does anyone knows if its feasible to have “2 recorders” with different databases and keep_days configuration?
I’m switching from the default recorder and want to use MariaDB addon.
I know that we can configure 2 different databases (already done) in the addon but how to manage it in order to have both in configuration with 2 distinct setups?
Thank you in advance.
PS: Want to use the addon instead of external instance.
Use case:
1 database with the majority of data with a 2 days purge.
1 database with energy sensors (at least) with a 730 days purge.
I use postgresql, but I believe similar is possible in mariadb, I created a pair of triggers that copy every add to events and states tables to a pair of archive tables. I copy everything but creating filter logic for the trigger sees like it would be easy. That said storage is pretty cheap. I keep 60 days in main HA tables and have 2+ years of archive. Total size of data is about 525GB.
I’m not sure about your ‘PS: Want to use the addon instead of external instance.’ requirement, I have my HA and postgresql hosted in two docker containers and use Jupyter, Grafana and AppDaemon in three more to analyze and process data.
I’m interested in your setup and script as well. Did you descripted it somewhere?
I want to store my ‘Energy dasboard’ data in a long term db, seperate from the default Sqllite db