RDB · snapshot
RDB writes a point-in-time snapshot of the whole dataset to one compact binary file (dump.rdb). The file is small and loads quickly, which makes it good for backups and for moving a dataset to another machine. The cost is data loss: if Redis stops between two snapshots, every write made after the last snapshot is gone. BGSAVE also forks a child process to write the file. Parent and child share copy-on-write, so while the child is writing the snapshot, every page the parent changes is copied, and memory use can rise noticeably. Redis 7 has RDB on by default: a snapshot is taken after an hour if at least 1 key changed, after 5 minutes if 100 changed, or after a minute if 10000 changed (save 3600 1 300 100 60 10000).
dump.rdbSAVE / BGSAVEsave 3600 1 300 100 60 10000