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.

BucketDefaultWhat It Keeps
hourly241 snapshot per hour for the last 24 hours
daily71 snapshot per day for the last 7 days
weekly41 snapshot per week for the last 4 weeks
monthly61 snapshot per month for the last 6 months
yearly31 snapshot per year for the last 3 years

Safety Presets

Three presets control how cautious GC is about deleting data.

PresetMinBlobAgeTwo-Cycle VerificationTrashRetention
Aggressive1hNo4h
Normal (Default)24hYes24h
Paranoid72hYes72h

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 normal

Backup 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