Skip to content

Instantly share code, notes, and snippets.

@mmguero
Last active January 8, 2026 22:20
Show Gist options
  • Select an option

  • Save mmguero/0068caeb9b9365ef59e5da76181aa555 to your computer and use it in GitHub Desktop.

Select an option

Save mmguero/0068caeb9b9365ef59e5da76181aa555 to your computer and use it in GitHub Desktop.
get redis keys/values
export REDISCLI_AUTH="$REDIS_PASSWORD" && \
redis-cli -h "$REDIS_HOST" -p "$REDIS_PORT" -n "$REDIS_FILESCAN_PRESERVATION_DATABASE" --scan |
while read -r key; do
type=$(redis-cli -h "$REDIS_HOST" -p "$REDIS_PORT" -n "$REDIS_FILESCAN_PRESERVATION_DATABASE" TYPE "$key")
echo "KEY: $key ($type)"
case "$type" in
list)
redis-cli -h "$REDIS_HOST" -p "$REDIS_PORT" -n "$REDIS_FILESCAN_PRESERVATION_DATABASE" LRANGE "$key" 0 -1 | jq
;;
esac
done
export REDISCLI_AUTH="$REDIS_PASSWORD" && \
redis-cli -h "$REDIS_CACHE_HOST" \
-p "$REDIS_CACHE_PORT" \
-n "$REDIS_STRELKA_COORDINATOR_CACHE_DATABASE" \
DBSIZE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment