Skip to content

Instantly share code, notes, and snippets.

@mmguero
Last active December 17, 2025 21:58
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment