Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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