How can I save/download the results from CLI in the localsystem?


#1

The following command gives a result as per query in the command line :

influx -host your_host -port 8086 -database 'your_db' -execute 'select * from your_metric' -format 'csv'

But I want to save these results on my system as raw .csv files. Is there a way ?


#2

influx -host your_host -port 8086 -database 'your_db' -execute 'select * from your_metric' -format 'csv' > my_file.csv Should do what you want. the > my_file.csv redirects the output to the file ‘my_file.csv’

HTH,
dg