Retention, Lifecycle, and Cost Control
A good backup system balances recovery depth with storage cost.
Retention Policy Example
| Tier | Keep | Use case |
|---|---|---|
| Daily | 14 days | Fast operational rollback |
| Weekly | 8 weeks | Short-term audit/recovery |
| Monthly | 12 months | Compliance and long-tail incidents |
Cleanup Command Example
retention-cleanup.sh
# remove objects older than 90 days from daily tier
rclone delete remote-prod:snapshots/daily --min-age 90d
# remove empty directories
rclone rmdirs remote-prod:snapshots/daily --leave-root
Lifecycle Strategy
| Strategy | Where |
|---|---|
| Provider-native lifecycle rules | S3/B2/R2 bucket settings |
| Rclone cleanup jobs | Portable cross-provider approach |
| Hybrid (recommended) | Provider rules + periodic audits |
warning
Test lifecycle and delete policy in non-production buckets first to avoid irreversible data loss.
Cost Observability Checklist
- Track object count and total size monthly.
- Alert on unusual growth rate.
- Review orphaned prefixes from old projects.