Bhakta Raghavan
Bhakta Raghavan

Reputation: 724

InfluxDB: Export/Import large number of points form one instance to another

I have an instance of InfluxDB installed in one of our customers premise, that I don't have access to.

I then need to import this data into my instance for analysis.

Is there a better way to do this?

Upvotes: 2

Views: 3090

Answers (1)

Tamil Selvan V
Tamil Selvan V

Reputation: 466

Usually backup/restore works for your use case. But you cannot restore the values to already existing database.

Backup: influxd backup -portable -database telegraf <path-to-backup>

This is a way suggested by official docs of influxdb to restore into already existing db

Restore the existing database backup to a temporary database.

influxd restore -portable -db telegraf -newdb telegraf_bak path-to-backup

Sideload the data (using a SELECT ... INTO statement) into the existing target database and drop the temporary database.

USE telegraf_bak

SELECT * INTO telegraf..:MEASUREMENT FROM /.*/ GROUP BY *

DROP DATABASE telegraf_bak

https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/#restore-examples

Upvotes: 1

Related Questions