Koskamo

Persistence with RDB and AOF

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Redis persistence writes data to durable storage with two options: RDB takes point-in-time snapshots of the dataset at intervals, while AOF logs every write operation in the same format as the Redis protocol itself, replaying it at startup to reconstruct the dataset. Persistence can be disabled completely — sometimes used when caching — or RDB and AOF can be combined in one instance. RDB is a compact single file, perfect for backups and disaster recovery, but it is not good at minimizing data loss: snapshots are usually created every five minutes or more, so an unexpected stop can cost the latest minutes of data, and the fork() needed to persist can pause client serving for some milliseconds with big datasets. AOF is more durable, with fsync policies of no fsync, every second, or every query; the default every-second policy keeps write performance great while losing at most one second of writes. The append-only log has no seeks or corruption problems on power outage, redis-check-aof can fix a half-written trailing command, and Redis rewrites the AOF safely in the background when it gets too big. Scope: Redis. Reviewed October 4, 2026.

Source and provenance

Original source
redis.io
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.