This episode manages the snapshot lifecycle: the prune policy with keep-last, keep-daily, keep-weekly, and keep-monthly per backup group, and how sync jobs maintain retention on the remote side. You will learn to align retention with RPO/RTO targets and verify prune results so the datastore stays healthy.

Encryption in episode 7 keeps data confidential, but how long snapshots survive has not been answered. Keep everything forever and storage balloons; delete too fast and your recovery points thin out. Episode 8 covers retention & prune policy — the policy language that decides which snapshots live and which retire.
Think of it like an archive cabinet with expiration rules: today's, yesterday's, and the last week's documents stay stored in full; older ones keep one per week, even older ones one per month. The cabinet stays organized without throwing away what is still needed — that is a good prune policy.
PBS offers retention rules applied per backup group. The rules:
Prune keeps the snapshots that satisfy the criteria and deletes the rest. A typical policy example:
keep-last: 7 → last 7 snapshots
keep-daily: 14 → 14 daily snapshots
keep-weekly: 8 → 8 weekly snapshots
keep-monthly: 6 → 6 monthly snapshotsIn PVE, retention is set on the backup job via the Prune Backups option (format keep-last=7,keep-daily=14,...). From the proxmox-backup-client CLI:
proxmox-backup-client prune \
--repository backup@pbs@10.0.1.10:store1 \
--keep-last 7 --keep-daily 14 --keep-weekly 8 --keep-monthly 6On the server side, prune can also be scheduled as a prune job (Datastore → Prune Jobs) so it runs automatically after backups. Prune is a metadata operation — fast, because it does not touch chunks. Remember the rule from episode 6: prune first, then GC.
Note
Prune only removes snapshots from the list, not their chunks directly. Disk space is only truly freed after GC. If prune seems to save no disk, that is normal — GC has not run yet.
Whenever snapshots are synced to a remote PBS (episode 10), retention must be set again on the remote side. Sync jobs have their own keep parameters and the --remove-vanished option, which removes remote snapshots that no longer exist on the source. This prevents the remote datastore from ballooning by copying all history without limit:
proxmox-backup-manager sync job update <id> \
--keep-last 7 --keep-daily 14 --remove-vanishedThis combination keeps the remote mirror compact: it stores the same retention subset as the source, without piling up duplicates.
Retention must answer two business questions:
Example policy for a medium workload:
| Level | Backup | Retention | Rationale |
|---|---|---|---|
| Critical | 6x/day | keep-last 10, keep-daily 14 | RPO of 4 hours, flexible recovery |
| Standard | 1x/day | keep-daily 14, keep-weekly 8 | RPO of 24 hours, weekly restore |
| Archive | 1x/day | keep-weekly 4, keep-monthly 12 | minimal storage, audit-ready |
After prune runs, verify the result matches your intent:
proxmox-backup-client snapshot list \
--repository backup@pbs@10.0.1.10:store1Check the count and timestamp range per backup group. If snapshots that are still needed were deleted, review the keep configuration — most likely the keep rules were set too small or there is a conflict between rules.
Warning
Beware of unintended keep combinations: for example keep-last 2 together with keep-daily 14 in the middle of a daily schedule. Each rule is calculated separately, and snapshots that pass any one of the rules are retained. Test in the lab and verify after prune before using it in production.
Key takeaways:
prune-backups) and CLI (proxmox-backup-client prune).--keep-*) and --remove-vanished so the remote does not balloon.proxmox-backup-client snapshot list.In the next episode, episode 9, we will make sure data does not silently corrupt: verify & integrity check — scheduling verification that reads and validates chunk checksums, using --verify-new for new snapshots, and auditing via task logs and datastore integrity checks. A backup that corrupts undetected is a disaster waiting to happen!