btrfs-backup-ng-prune - Man Page
apply retention policies
Synopsis
btrfs-backup-ng prune [Options]
Description
Apply retention policies to clean up old snapshots and backups. Evaluates each snapshot against the configured retention rules and removes those that exceed the limits.
Retention is evaluated with these rules:
- min - Absolute minimum retention. Nothing is deleted before this age.
- Time buckets (hourly, daily, weekly, monthly, yearly) are evaluated newest-to-oldest.
- The first snapshot in each bucket is kept.
- The latest snapshot is always preserved.
- Snapshots needed for incremental backup chains are preserved.
Options
- --dry-run
Show what would be deleted without making any changes. Highly recommended before running prune for the first time.
Examples
- Show what would be pruned (dry run):
btrfs-backup-ng prune --dry-run
- Apply retention policies:
btrfs-backup-ng prune
Retention Configuration
Example retention settings in config.toml:
[global.retention] min = "1d" # Keep everything for at least 1 day hourly = 24 # Then keep 24 hourly snapshots daily = 7 # Then keep 7 daily snapshots weekly = 4 # Then keep 4 weekly snapshots monthly = 12 # Then keep 12 monthly snapshots yearly = 0 # Don't keep yearly (0 = disabled)
See Also
Referenced By
btrfs-backup-ng(1), btrfs-backup-ng-run(1).
January 2026 btrfs-backup-ng