Skip to content

Instantly share code, notes, and snippets.

@wardbekker
Created October 23, 2017 17:45
Show Gist options
  • Save wardbekker/0a328f44dab30c6a200bc371ef7f430d to your computer and use it in GitHub Desktop.
Save wardbekker/0a328f44dab30c6a200bc371ef7f430d to your computer and use it in GitHub Desktop.
OUTPUT=http://localhost:9200
indices=`cat indices.txt`
for INDEX in $indices
do
echo $INDEX
elasticdump --output=$OUTPUT/$INDEX --input="${INDEX}_mapping.json" --type=mapping
elasticdump --output=$OUTPUT/$INDEX --input="${INDEX}_data.json" --type=data --limit=1000
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment