Influxdb to Victoriametrics - hhaim/hass GitHub Wiki
Why?
- Influxdb 2.x has a new query language
- VM is much more efficient and backward compatible with the ingestion protocol. 2.1 In my case same DB (after conversion) in VM is 100M while in InfluxDB it is 3GB (x30 better)
- The PromQL has more function than the old unsupported 1.x influx query language
- Much faster query time
How?
- run this to move the data
sudo docker run victoriametrics/vmctl:stable --influx-addr {url} --influx-user {user} --influx-password {passwrd} --influx-database hass_db --vm-addr {vm-url}
- change the port of the influx to the new DB (8248)
- remove the old influxDB DB
see https://github.com/hhaim/hass/commit/dfe646271338e6bcd2493d466db70d33820eb343 https://github.com/hhaim/hass/commit/a60df2473de268f11f578d360c53bc5c93ea2a0b