Export daily data to csv

Influx can produce the CSV for you. Have a look at influx --help output.

For example, under bash, assuming you have the influx executable in your path, you can do something along the line of this:

influx -username your_user_if_any -password "secret!" -database 'db_name' -host 'localhost' -execute 'SELECT * FROM "db_name"."your_retention_policy_or_nothing"."your_measurement_name" WHERE time > '\''2017-09-05'\'' and time < '\''2017-09-05T23:59:59Z'\'' AND other_conditions_if_required' -format 'csv' > /tmp/your_measurement_name_20170905.csv

This should help you getting started. (The tricky part was the single quote escape on (ba)sh).

5 Likes