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.
I am now planning to use FOR each measurement: "influx -execute 'select * from ' -format csv -> measurement.txt
And export all these files as a tar.gz. I still need to figure out how to import this data into my instance but that should not be an issue.
Is there a better way to do this?
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>
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