Persistence Options in Redis
From the Redis cheat sheet ยท Persistence & Backup ยท verified Jul 2026
Persistence Options
RDB snapshots and AOF logging
bash
# RDB (snapshots)
SAVE # Synchronous save
BGSAVE # Background save
LASTSAVE # Last save timestamp
# AOF (Append Only File)
CONFIG SET appendonly yes
BGREWRITEAOF # Rewrite AOF file
# Configure in redis.conf
save 900 1 # Save after 900s if 1 key changed
appendonly yes # Enable AOF๐พ RDB for periodic snapshots
๐ AOF for write durability
๐ Hybrid mode combines both benefits
โก Choose based on durability vs performance needs