Redis Admin and redis-cli Cheat Sheet

redis-cli operational workflows, latency inspection, slowlog, config, ACL, clients, and safe administrative controls.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

redis-cli workflows

Shell usage, monitoring, latency inspection, and scripting-friendly output.

Run a single command from shell

Execute one command non-interactively.

bashANYredisredis-clishell
bash
redis-cli GET app:name

Print raw output

Return plain output suitable for shell pipelines.

bashANYredisredis-clioutput
bash
redis-cli --raw LRANGE jobs 0 -1

Print CSV output

Render replies as CSV.

bashANYredisredis-clioutput
bash
redis-cli --csv HGETALL user:1

Run latency doctor

Inspect latency spikes and advice from the server.

bashANYredisredis-clilatency
bash
redis-cli --latency-doctor

Track latency continuously

Sample latency continuously at an interval.

bashANYredisredis-clilatency
bash
redis-cli --latency-history -i 1

Find big keys

Scan for the largest keys by data type.

bashANYredisredis-clibigkeys
bash
redis-cli --bigkeys

Find memory-heavy keys

Scan for keys consuming large amounts of memory.

bashANYredisredis-climemory
bash
redis-cli --memkeys

Show live stats

Continuously display ops, mem, clients, and other stats.

bashANYredisredis-climonitoring
bash
redis-cli --stat

Scan keys from shell

Stream matching keys to stdout.

bashANYredisredis-cliscan
bash
redis-cli --scan --pattern 'user:*'

Dump an RDB snapshot from a live server

Request an RDB file from a live server and save it locally.

bashANYredisredis-clibackup
bash
redis-cli --rdb dump.rdb

Monitor every command

Stream every command processed by the server.

bashANYredismonitordanger
bash
MONITOR
Notes

Useful for debugging, but heavy and potentially unsafe on busy production nodes.

Read slow query log

Show recent slow commands.

bashANYredisslowlogperformance
bash
SLOWLOG GET 20

Count slowlog entries

Return how many entries are in the slow log.

bashANYredisslowlog
bash
SLOWLOG LEN

Read latest latency events

Show recent named latency spikes.

bashANYredislatencymonitoring
bash
LATENCY LATEST

Server-side latency diagnosis

Get a narrative diagnosis of latency events.

bashANYredislatencymonitoring
bash
LATENCY DOCTOR

Server administration

Configuration, ACL, clients, and operational controls.

Read configuration values

Read current server configuration values.

bashANYredisconfigadmin
bash
CONFIG GET maxmemory

Change a configuration value

Change a config value at runtime.

bashANYredisconfigadmin
bash
CONFIG SET maxmemory 1gb

Rewrite config file

Persist runtime config changes back to redis.conf where possible.

bashANYredisconfigadmin
bash
CONFIG REWRITE

Terminate a client

Disconnect a matching client connection.

bashANYredisclientadmin
bash
CLIENT KILL 127.0.0.1:55000

Pause client processing

Temporarily pause clients for controlled maintenance.

bashANYredisclientmaintenance
bash
CLIENT PAUSE 5000 WRITE

Resume paused clients

Resume client processing after a pause.

bashANYredisclientmaintenance
bash
CLIENT UNPAUSE

List ACL users

Inspect effective ACL rules.

bashANYredisaclsecurity
bash
ACL LIST

Create or update an ACL user

Create or modify a scoped user.

bashANYredisaclsecurity
bash
ACL SETUSER app-user on >strongpass ~app:* +GET +SET +DEL

Inspect one ACL user

Read ACL rules for a single user.

bashANYredisaclsecurity
bash
ACL GETUSER app-user

Delete ACL users

Delete one or more ACL users.

bashANYredisaclsecurity
bash
ACL DELUSER old-user

List ACL categories

List ACL categories or commands inside one category.

bashANYredisaclsecurity
bash
ACL CAT

Delete all keys in current DB

Clear the selected database asynchronously.

bashANYredisflushdbdanger
bash
FLUSHDB ASYNC

Delete all keys in all DBs

Clear every logical database asynchronously.

bashANYredisflushalldanger
bash
FLUSHALL ASYNC

Force a synchronous save

Block the server while creating an RDB snapshot.

bashANYredispersistencesave
bash
SAVE

Fork an asynchronous save

Create an RDB snapshot in the background.

bashANYredispersistencesave
bash
BGSAVE

Gracefully stop the server

Stop Redis and optionally save current state.

bashANYredisshutdowndanger
bash
SHUTDOWN SAVE

Recommended next

No recommendations yet.