Skip to main content

Dump Operation

Indexes in Elasticsearch are filtered according to the query according to the value in the --searchBody field and dumped to the /tmp/es_backup folder with the following command.
Filtering can be done according to specific API Gateway IDs with the --searchBody parameter. You need to change the IDs shown in the example according to your environment.

./multielasticdump --direction=dump --match='apilogs*'
--input=http://<ELASTICSEARCH_IP>:9200
--ignoreType='mapping,settings,template'
--output=/tmp/es_backup --searchBody="{\"query\": {\"terms\": { \"apiGatewayId\": [33,38,96,97,99,100,101,82,80]}}}"
--overwrite
--ignoreChildError=true
--ignoreMapping=true
--ignoreSettings=true
--ignoreTemplate=true
--ignoreAlias=true

Installation

CentOS/RHEL

yum install npm
npm install elasticdump
npm install --no-bin-links elasticdump

Detailed Information

You can check the elasticsearch-dump GitHub page for more information.