Skip to content

Instantly share code, notes, and snippets.

@saruba
Created March 18, 2016 10:17
Show Gist options
  • Save saruba/d65602492eb2e21350a4 to your computer and use it in GitHub Desktop.
Save saruba/d65602492eb2e21350a4 to your computer and use it in GitHub Desktop.
Dump from elasticsearch
# https://github.com/taskrabbit/elasticsearch-dump
# Install npm in ubuntu:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
# Optional
sudo apt-get install -y build-essential
# Install global elasticdump
sudo npm install elasticdump -g
# Dump
elasticdump --all=true --input=http://localhost:9200/ --output=/data/backup.json
# Restore
elasticdump --bulk=true --input=/data/backup.json --output=http://localhost:9200/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment