Skip to content

Instantly share code, notes, and snippets.

@phss
Created November 21, 2013 10:10
Show Gist options
  • Save phss/7579104 to your computer and use it in GitHub Desktop.
Save phss/7579104 to your computer and use it in GitHub Desktop.
ElasticSearch dump and import
#!/bin/bash
for day in $(seq -f "%02g" 1 20)
do
index="logstash-2013.11.$day"
echo "Processing index $index"
#esdump --url http://localhost:9200 --indexes $index --gzip --file $index.gz
#esimport --url http://elasticsearch:9200 --file $index.gz --index $index
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment