Export data from InfluxDB

2020-05-19 07:33发布

Is there a way (plugin or tool) to export the data from the database (or database itself) ? I'm looking for this feature as I need to migrate a DB from present host to another one.

标签: influxdb
7条回答
beautiful°
2楼-- · 2020-05-19 08:18

Export data:

sudo service influxdb start (Or leave this step if service is already running)
influxd backup -database grpcdb /opt/data  

grpcdb is name of DB and back up will be saved under /opt/data directory in this case.

Import Data:

sudo service influxdb stop  (Service should not be running)
influxd restore -metadir /var/lib/influxdb/meta /opt/data
influxd restore -database grpcdb -datadir /var/lib/influxdb/data /opt/data
sudo service influxdb start
查看更多
登录 后发表回答