Skip to content

Instantly share code, notes, and snippets.

@manti-by
Created April 19, 2023 14:52
Show Gist options
  • Save manti-by/9939e45a55e447a040b22d5dceacabd2 to your computer and use it in GitHub Desktop.
Save manti-by/9939e45a55e447a040b22d5dceacabd2 to your computer and use it in GitHub Desktop.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment