Backup and Restore
Backup / restore 處理 crash consistency 之外的資料遺失:device failure、誤刪、software bug、ransomware、災害。Journal / COW 不能取代 backup。
Backup Types
| Type | What is copied | Restore | Cost |
|---|---|---|---|
| full backup | 所有需要保護的 files | 只需最近 full | daily cost 高 |
| incremental | 自上次 backup 以來改變的 files | full + 每次 incremental | backup 小、restore 慢 |
| differential-style | 自上次 full 以來改變的 files | full + 最新 differential | 越接近週期尾端越大 |
Restore Metrics
- backup time:每天能花多少時間備份。
- backup space:能保存多少版本。
- restore time / RTO:災難後多久恢復服務。
- recovery point / RPO:最多能接受遺失多久的變更。
- retention:要保存多久以前的版本。
Practical Point
重要資料需要 off-site、多份 copy、immutable backup 或 replication。沒有定期測試 restore 的 backup,只是「看起來有備份」。