Skip to content

Instantly share code, notes, and snippets.

@sokratisg
Created April 8, 2015 14:31
Show Gist options
  • Save sokratisg/646a8da256f64c1e7e21 to your computer and use it in GitHub Desktop.
Save sokratisg/646a8da256f64c1e7e21 to your computer and use it in GitHub Desktop.
Shell oneliner to update replicas of all elasticsearch indices
for i in `curl -XGET http://localhost:9200/_cat/indices | awk '{print $3}'`; do echo "curl -XPUT 'localhost:9200/$i/_settings' -d '{\"index\":{\"number_of_replicas\":1}}'"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment