Configure Redis RDB and AOF persistence for durability and fast restart

domain: redis · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In redis.conf enable RDB snapshots with save directives (e.g., save 3600 1 meaning save after 3600 seconds if at least 1 key changed) and set dbfilename dump.rdb with a full dir path
  2. Enable AOF: set appendonly yes, appendfilename appendonly.aof, and appendfsync everysec (flushes WAL to disk every second; at most one second of data loss on crash)
  3. Enable hybrid persistence with aof-use-rdb-preamble yes — the AOF file begins with an RDB snapshot followed by incremental AOF commands, giving fast restart from the RDB preamble with near-real-time durability from AOF replay
  4. Set auto-aof-rewrite-percentage and auto-aof-rewrite-min-size to trigger automatic AOF rewrites that compact the file; run BGREWRITEAOF manually if the AOF grows unexpectedly large
  5. For replicas, configure the primary's repl-diskless-sync yes to stream RDB over the network without writing to disk on the primary, reducing primary disk I/O during full sync
  6. Test recovery: stop Redis, delete the RDB and let it reload from AOF only, or vice versa; verify data completeness before relying on the configuration in production

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans