Skip to content

Instantly share code, notes, and snippets.

@manti-by
Last active May 20, 2025 14:26
Show Gist options
  • Select an option

  • Save manti-by/9939e45a55e447a040b22d5dceacabd2 to your computer and use it in GitHub Desktop.

Select an option

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.40.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