Course contentsShow
← Cloud and Infrastructure
Lesson 2420 of 2,98952. Disaster Recovery and BackupFree lesson

Backup Retention Policies

Define backup retention schedules based on compliance, cost, and recovery requirements using GFS and Tower of Hanoi.

Backup Retention Policies

What you'll learn: How to define backup retention schedules that balance compliance requirements, storage costs, and recovery needs using industry-standard rotation schemes.

The Core Challenge

You've mastered full, incremental, and differential backups—but how long should you keep them? A backup retention policy determines which backups to keep, for how long, and when to delete them. Too short, and you violate compliance or lose critical historical data. Too long, and storage costs spiral out of control.

Key Factors Driving Retention Decisions

Compliance requirements often mandate minimum retention periods (e.g., financial records for 7 years). Recovery requirements determine how far back you need to restore from. Storage costs push you to delete older backups efficiently.

Grandfather-Father-Son (GFS) Rotation

GFS is the most common retention scheme. Think of it like organizing family photos:

  • Daily backups (Son): Keep for 1–2 weeks
  • Weekly backups (Father): Keep for 1–3 months
  • Monthly backups (Grandfather): Keep for 1–7 years

You run daily backups but promote certain ones to "weekly" status, then promote certain weeklies to "monthly." This creates a retention pyramid: many recent backups, fewer old ones—balancing granular recovery with long-term compliance.

Tower of Hanoi Rotation

This mathematical approach optimizes tape/media rotation by ensuring even wear and efficient coverage. Backups are organized in "levels" with exponentially increasing intervals (daily, every 2 days, every 4 days, etc.). It's more complex but uses fewer backup sets than GFS while maintaining similar coverage.

Practical Application

For a typical cloud workload: daily incrementals for 14 days, weekly fulls for 8 weeks, monthly fulls for 12 months, yearly fulls for 7 years. Configure automated deletion rules in your backup service to enforce this policy.

Key Takeaway: Design retention policies by mapping compliance mandates to GFS or Tower of Hanoi schemes, keeping recent backups granular and aging them into longer-term archives to balance recovery speed, regulatory needs, and storage costs.