This tool will help to migrate data from Maria DB to an InfluxDB used by Homeassistant. I have used / tested with versions:
- Homeassistant Verison 2025.1.x
- InfluxDB 5.0.1
- MariaDB 2.7.2
Setup:
-
git clone <this repository> MariaDBInfluxDB_Migration
-
cd MariaDBInfluxDB_Migration
-
Update now database name an credentials in script my_influxdbmigration.py for MariaDB and InfluxDB in mariadb_connection use, password, database in influx_client username, password, database
-
python3 -m venv .venv
-
. .venv/bin/activate
-
pip install pymysql influxdb
-
python my_influxdbmigration.py
Be patient ;-). Conversion is done automatically in batches, takes a while ....