gitvegas
gitvegas

Reputation: 111

Influxdb Move Copy data between databases within 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?

Upvotes: 8

Views: 17228

Answers (1)

Michael Desa
Michael Desa

Reputation: 4747

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

Upvotes: 21

Related Questions