VictoriaMetrics-Community / homeassistant-addon-victoriametrics

VictoriaMetrics Add-on for Home Assistant OS is the perfect solution for long term data storage of your smart home sensor data and visualization with Grafana.
MIT License
95 stars 24 forks source link

Question: migrate from influx DB #23

Closed erkr closed 1 year ago

erkr commented 1 year ago

Hi Any guidance on migrating my existing influx data towards this great alternative? Does fully compatible mean I can even import a backup from influx DB? Best Eric

fuslwusl commented 1 year ago

You can try to export your existing influxdb as csv https://docs.influxdata.com/influxdb/v1.8/tools/influx_inspect/#export

Example: curl -H 'Accept: application/csv' -G 'http://192.168.178.188:8086/query?db=openhab_db' --data-urlencode 'q=SELECT * FROM Test' > test.csv ` VictoriaMetrics supports csv import https://docs.victoriametrics.com/#how-to-import-csv-data

Example: curl -d 'http://localhost:8428/api/v1/import/csv?format=4:metric:test,3:time:unix_ms,1:label:ha'

If you have any trouble with migration see the victoriametrics docs or the github issue tracker.

erkr commented 1 year ago

Thanks for the explanation, will give it a try 🙏

chintito4ever commented 1 year ago

How do I export if I was running InfluxDB as an Addon on HA OS?