-
-
Save MrBuBBLs/a258c585880dbdaea4b1fb37f320dfa8 to your computer and use it in GitHub Desktop.
Flushall on Redis cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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