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 You want to export in an readable format, the inspect command is to prefer.
To export the database with the name HomeData the command is:

```
sudo influx_inspect export -waldir /var/lib/influxdb/wal -datadir /var/lib/influxdb -out "influx_backup.db" -database HomeData

```

The parameters for -waldir and -datdir can be found in /etc/influxdb/influxdb.conf.

To import this file again, the command is:

```
influx -import -path=influx_backup.db

```