Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Influxdb Move Copy data between databases within Influxdb

Tags:

influxdb

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?

like image 370
gitvegas Avatar asked Apr 30 '16 01:04

gitvegas


1 Answers

InfluxQL provides an INTO clause that can be used to copy data between databases.

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 *

For more information, see the documentation

like image 135
Michael Desa Avatar answered Sep 24 '22 08:09

Michael Desa