Sebbene Redis sia in-memory, può persistere i dati su disco affinché i dati sopravvivano ai riavvii. Offre due meccanismi — RDB (snapshot point-in-time) e AOF (log append-only delle operazioni) — con diversi compromessi tra durabilità e performance.
RDB — snapshot point-in-time
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"
