Import & export Elasticsearch data, e.g. Kibana dashboards & configuration.
Upload documents from /var/import
to Elasticsearch running on http://localhost:9200
$docker run --rm \
-e ES_BASE_URI=http://localhost:9200 \
-v /var/import:/app/import \
awesomeinc/elastic_provisioner
00_wait_for_es
Waiting for Elasticsearch to come up...
01_import
Provisioning 'http://elasticsearch:9200'...
....
Provisioning done.
Export documents of an Elasticsearch index to /var/export
:
$docker run --rm \
-v /var/export:/app/export \
awesomeinc/elastic_provisioner \
export.rb [.kibana] [export]
Exporting 'http://elasticsearch:9200/.kibana' to 'export'...
...
Exporting done.
This fetches the .kibana
index and downloads documents into /var/export
.
A glitch when running elasticsearch via docker on localhost using Docker for Windows.
Instead of localhost
use host.docker.internal
, cf. e.g.