This file describes how to make a local copy of the InfluxDB database and create a JSON dump of the SOL Objects. We assume that you are working in a GNU/Linux environment.
If influxDB is not installed on your machine, follow the official website guide: https://influxdata.com/
influxd backup -database realms /my/dump/name
Note that dumps are currently made every our and can be found at "/home/realms/influx_backup/*"
After transferring the dump into your local machine, stop your local InfluxDB server
sudo service influxdb stop
Now you can import the dump file into your local database:
sudo influxd restore -metadir /var/lib/influxdb/meta/ /path/to/dump/folder/
sudo influxd restore -database realms -datadir /var/lib/influxdb/data /path/to/dump/folder/
Restart the local InfluxDB server:
sudo service influxdb start
Query the local database (example):
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=realms" --data-urlencode "q=SELECT * FROM SOL_TYPE_DUST_SNAPSHOT WHERE site = 'ARG_junin'" > DUST_SNAPSHOT.dump
TODO: add script to export data into json