Influxdb在Influxdb中的数据库之间移动复制数据 [英] Influxdb Move Copy data between databases within Influxdb
本文介绍了Influxdb在Influxdb中的数据库之间移动复制数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Influxdb中有my_db1,my_db2,my_db3,现在是否可以通过查询在这些数据库之间移动或复制数据?
I have my_db1, my_db2, my_db3 in Influxdb, now is there a way to move or copy data between these databases with a query?
推荐答案
InfluxQL提供了一个INTO
子句,可用于在数据库之间复制数据.
InfluxQL provides an INTO
clause that can be used to copy data between databases.
例如,如果我在db_1
中具有点cpu,host=server1 value=100 123
,并且想要将该数据复制到db_2
中的点new_cpu,host=server1 value=100 123
.我可以发出以下查询:
For example, if I had the point cpu,host=server1 value=100 123
in db_1
and wanted to copy that data to the point new_cpu,host=server1 value=100 123
in db_2
. I could issue the following query:
SELECT * INTO db_2..new_cpu FROM db_1..cpu group by *
有关更多信息,请参见文档 a>
For more information, see the documentation
这篇关于Influxdb在Influxdb中的数据库之间移动复制数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文