Created
March 18, 2016 10:17
-
-
Save saruba/d65602492eb2e21350a4 to your computer and use it in GitHub Desktop.
Dump from elasticsearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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