जरी Redis in-memory असले तरी, तो डेटा डिस्कवर persist करू शकतो जेणेकरून डेटा restarts मध्ये टिकून राहतो. हे दोन यंत्रणा प्रदान करते — RDB (point-in-time snapshots) आणि AOF (operations चा append-only log) — जे वेगवेगळ्या durability/performance trade-offs सह आहेत.
RDB — point-in-time snapshots
RDB takes SNAPSHOTS of the dataset at intervals, saving a compact binary file.
✓ Compact single-file backups; fast restarts (load the snapshot)
✓ Good for backups and disaster recovery; less impact on performance
✗ You can LOSE data since the last snapshot (e.g. last few minutes) if Redis crashes
→ Configure save points: e.g. "save after 900s if ≥1 change, 300s if ≥10 changes"
