Migrate measurements from one influxdb to another

Hello,

i want to migrate a bunch of measurements from our influx testing envoirenment to our productive env.
I already fiddled around with a curl like:

curl -G ‘test:8086/query?’; --data-urlencode “db=dbname” --data-urlencode “q=SELECT * FROM series_name” > series.json

and did a XPOST

curl -XPOST -d @series.jsonhttps://localhost:8086/write?db=import

This runs through my whole file but stops with:

}]}]}': missing tag value"}

My Import DB is still empty.

So how can i migrate this stuff?

Regards

Hi,

The reason this doesn’t work is because the data isn’t in line protocol, which is the format InfluxDB expects. You might try using the backup and restore feature rather than moving the data manually with files. Otherwise, you have to deal with the format of the data.

I just want to copy only one measurement from one influxdb server to another. The client query output doesn’t seem to support “line” format. Backup and restore doesn’t seem to support specifying a single measurement. Am I wrong? What would be the best way to accomplish this?

1 Like

I need help on the same problem. Can someone help here?

Well, the data is: timestamp data

So my guess - the easy one would be to format it with awk into a format that curl can update :slight_smile: