needlehack-team/needlehack

[NH-008] - Export/Import to elasticsearch

Opened this issue · 2 comments

We need to export data from our local elasticsearch and import at cloud elasticsearch.

For this we can use https://github.com/taskrabbit/elasticsearch-dump

Using elasticsearch-dump, we could move data from our local elastic to the cloud elastic using or npm library or the docker image as follow:

docker run taskrabbit/elasticsearch-dump
--input=http://LOCAL_ELASTIC
--output=http://CLOUD_ELASTIC
--type=data

Test import/export on local

docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.2.0

docker run -d --link f215ab1d5f26:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.2.0

docker run --link ELASTIC_CONTAINER_NAME:elasticsearch taskrabbit/elasticsearch-dump --input=http://elasticsearch:9200/INDEX
--output=http://elasticsearch:9200/INDEX2
--type=data