从InfluxDB导出数据 [英] Export data from InfluxDB
本文介绍了从InfluxDB导出数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种方法(插件或工具)从数据库(或数据库本身)导出数据?我正在寻找此功能,因为我需要将数据库从当前主机迁移到另一台主机.
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.
推荐答案
您可以转储每个表并通过REST接口加载它们:
You could dump each table and load them through REST interface:
curl "http://hosta:8086/db/dbname/series?u=root&p=root&q=select%20*%20from%20series_name%3B" > series_name.json
curl -XPOST -d @series_name.json "http://hostb:8086/db/dbname/series?u=root&p=root"
或者,也许您想添加新主机到集群?这很容易,您将免费获得主-主副本. 集群设置
Or, maybe you want to add new host to cluster? It's easy and you'll get master-master replica for free. Cluster Setup
这篇关于从InfluxDB导出数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文