Build the mental model
RDB creates compact point-in-time snapshots with fast restore but can lose writes between snapshots. AOF logs writes and can reduce the loss window according to fsync policy, at storage and rewrite cost. Replication is not a backup because deletion or corruption can propagate to replicas.
Connect it to a real scenario
Define separate RPO and RTO targets for cache-only data and durable streams. Choose an RDB and AOF policy, copy backups off-host with encryption and retention, and run scheduled restore drills in isolation. Monitor memory and latency during forks and rewrites.
Try the working example
CONFIG GET save
CONFIG GET appendonly
CONFIG GET appendfsync
BGSAVE
BGREWRITEAOF
LASTSAVE
INFO persistenceYou can inspect snapshot and AOF state, last save time, and background operations.5-minute try-it
Design persistence and backup for a job stream with one-minute RPO and 15-minute RTO.
One important caution
Do not copy live data files arbitrarily; follow documented snapshot or AOF backup procedures and verify integrity.
Redis — Persistence — Redis