Skip to content

Instantly share code, notes, and snippets.

@MrBuBBLs
Forked from yaud/flushall-cluster.sh
Last active June 24, 2020 13:51
Show Gist options
  • Select an option

  • Save MrBuBBLs/a258c585880dbdaea4b1fb37f320dfa8 to your computer and use it in GitHub Desktop.

Select an option

Save MrBuBBLs/a258c585880dbdaea4b1fb37f320dfa8 to your computer and use it in GitHub Desktop.
Flushall on Redis cluster
#!/bin/sh
NODES=`redis-cli cluster nodes | cut -f2 -d' '`
IFS="
"
for node in $NODES; do
echo Flushing node $node...
redis-cli -h ${node%:*} -p ${node##*:} flushall
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment