Question: Is there a way (plugin or tool) to export the data from the database (or database itself) ? I'm looking for this feature as I need to migrate a DB from present host to another one.

Answer: 
Export data:

```
sudo service influxdb start (Or leave this step if service is already running)
influxd backup -database grpcdb /opt/data  

```

grpcdb is name of DB and back up will be saved under /opt/data directory in this case.

Import Data:

```
sudo service influxdb stop  (Service should not be running)
influxd restore -metadir /var/lib/influxdb/meta /opt/data
influxd restore -database grpcdb -datadir /var/lib/influxdb/data /opt/data
sudo service influxdb start

```
If I use curl, I get timeouts, and if I use `influxd backup` its not in a format I can read.

I'm getting fine results like this:

```
influx -host influxdb.mydomain.com -database primary -format csv -execute "select time,value from \"continuous\" where channel='ch123'" > outtest.csv

```