Careeroza
Backup Strategy
RPO and RTO
| Term | Question it answers | Example target |
|---|---|---|
| RPO (Recovery Point Objective) | how much data can we afford to lose? | 5 minutes → log backups every 5 minutes |
| RTO (Recovery Time Objective) | how long can we be down? | 1 hour → restore must finish within an hour |
The 3-2-1 Rule
- 3 copies of the data,
- on 2 different types of storage,
- with 1 copy off-site (another region or cloud account).
A common schedule: weekly full, daily differential, log backups every 5 to 15 minutes, kept for 30 days.
Test Your Restores
Note: A backup that has never been restored is only a hope. Schedule regular restore drills to a separate server, check the data, and time how long it takes against your RTO.
- Verify backups with checksums (
WITH CHECKSUM,pg_verifybackup). - Monitor that backup jobs actually ran and alert on failure.
- Replication and high availability are not backups: a
DROP TABLEis replicated instantly.