Install NVM, NPM and Elasticdump
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install --lts
npm install elasticdump -g
Dump data into file
elasticdump \
--input=http://localhost:9200/sample_index \
--output=sample_index.json \
--type=data
Restore data from a file
elasticdump \
--input=sample_index.json \
--output=http://localhost:9200/sample_index \
--type=data