LASTSAVERedis Persistence, Replication, and Cluster Cheat Sheet
RDB, AOF, replication, failover, Lua scripts, functions, and cluster command references for operational Redis use.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
Persistence
RDB, AOF, rewrite, and durability-related commands.
bashANYredispersistencelastsave
bash
bashANYredisaofrewrite
bash
BGREWRITEAOFWait for replicas to acknowledge writes
Block until writes reach a minimum number of replicas or timeout.
bashANYredisreplicationdurability
bash
WAIT 1 5000bashANYredisaofdurability
bash
WAITAOF 1 1000 5000Replication and failover
Replica setup, role inspection, and controlled failover.
bashANYredisreplicationreplicaof
bash
REPLICAOF 10.0.0.10 6379bashANYredisreplicationpromote
bash
REPLICAOF NO ONEbashANYredisreplicationrole
bash
ROLEbashANYredisreplicationfailover
bash
FAILOVERbashANYredisreplicationinternal
bash
PSYNC ? -1Lua scripts and functions
Server-side execution for atomic workflows and reusable logic.
bashANYredisluaeval
bash
EVAL "return redis.call('GET', KEYS[1])" 1 user:1:namebashANYredisluaevalsha
bash
EVALSHA <sha1> 1 user:1:namebashANYredisluascript
bash
SCRIPT LOAD "return 1"bashANYredisluascript
bash
SCRIPT EXISTS <sha1>bashANYredisluascript
bash
SCRIPT FLUSHbashANYredisfunctionlua
bash
FUNCTION LOAD "#!lua name=mylib
redis.register_function('ping', function() return 'pong' end)"bashANYredisfunctioninspect
bash
FUNCTION LISTbashANYredisfunctionexecute
bash
FCALL ping 0bashANYredisfunctionadmin
bash
FUNCTION DELETE mylibCluster basics
Redis Cluster slot inspection and cluster-aware operations.
bashANYredisclusterinspect
bash
CLUSTER INFObashANYredisclusterinspect
bash
CLUSTER NODESbashANYredisclusterinspect
bash
CLUSTER SLOTSbashANYredisclusterslot
bash
CLUSTER KEYSLOT user:{42}:profilebashANYredisclusterslot
bash
CLUSTER COUNTKEYSINSLOT 1234bashANYredisclusterreplica
bash
READONLYbashANYredisclusterreplica
bash
READWRITEbashANYredisclustermigration
bash
ASKINGMore in Redis
Redis Admin and redis-cli Cheat Sheet
redis-cli operational workflows, latency inspection, slowlog, config, ACL, clients, and safe administrative controls.
Redis Transactions, Pub/Sub, and Streams Cheat Sheet
Atomic transactions, optimistic locking, pub/sub messaging, streams, consumer groups, geo commands, bitmaps, and HyperLogLog.
Redis Data Types Cheat Sheet
High-value Redis commands for lists, sets, hashes, and sorted sets used in queues, objects, tags, and leaderboards.
Redis Cheat Sheet
Comprehensive Redis commands for redis-cli, key lifecycle, strings, expiration, and core operational workflows.