Retention & Garbage Collection
Smart retention keeps useful snapshots. Automatic cleanup frees wasted space.
GFS Retention (Grandfather-Father-Son)
Ginkgo uses GFS rotation to keep snapshots organized across time buckets — from hours to years.
| Bucket | Default | What It Keeps |
|---|---|---|
| hourly | 24 | 1 snapshot per hour for the last 24 hours |
| daily | 7 | 1 snapshot per day for the last 7 days |
| weekly | 4 | 1 snapshot per week for the last 4 weeks |
| monthly | 6 | 1 snapshot per month for the last 6 months |
| yearly | 3 | 1 snapshot per year for the last 3 years |
Safety Presets
Three presets control how cautious GC is about deleting data.
| Preset | MinBlobAge | Two-Cycle Verification | TrashRetention |
|---|---|---|---|
| Aggressive | 1h | No | 4h |
| Normal (Default) | 24h | Yes | 24h |
| Paranoid | 72h | Yes | 72h |
Garbage Collection
GC removes data blocks that are no longer referenced by any snapshot. Run with --dry-run first to preview what will be deleted.
ginkgo retention gc --repo /backup/repo1 --dry-run
ginkgo retention gc --repo /backup/repo1 --safety normalBackup Verification
Verify backup integrity. Quick mode checks the index. Deep mode reads and validates every data block on disk.
ginkgo verify --source 1
ginkgo verify --source 1 --deep