canasta backup purge
From Canasta Wiki
canasta backup purge
Remove old backups based on retention policy
Synopsis
Remove backup snapshots that exceed the specified retention policy and reclaim disk space. At least one retention flag (--older-than or --keep-last) is required.
canasta backup purge [flags]
Examples
# Remove backups older than 30 days
canasta backup purge -i myinstance --older-than 30d
# Keep only the 10 most recent backups
canasta backup purge -i myinstance --keep-last 10
# Combine: keep last 5 and anything within 14 days
canasta backup purge -i myinstance --older-than 14d --keep-last 5
# Preview what would be removed
canasta backup purge -i myinstance --older-than 30d --dry-run
Flags
| Flag | Shorthand | Description | Default | Required |
|---|---|---|---|---|
--dry-run |
Show what would be removed without actually removing | |||
--help |
-h |
help for purge | ||
--keep-last |
Always keep the N most recent snapshots | |||
--older-than |
Remove snapshots older than this duration (e.g., 30d, 6m, 1y) | |||
--id |
-i |
Canasta instance ID | instance associated with current directory | |
--verbose |
-v |
Verbose output |