This episode dissects PBS efficiency: content-defined chunking that produces dedup across backups and VMs, and how to read the dedup metrics in a datastore. You will also understand the prune (retention) then garbage collection flow to delete unused chunks, and schedule GC so your storage does not balloon.

Restore was tested in episode 5 — now we talk about cost. Unmanaged backups keep growing until the disk is full. PBS solves two problems at once: deduplication ensures data is not stored repeatedly, and garbage collection cleans up leftover chunks that are no longer needed. Episode 6 is the heart of PBS efficiency.
Imagine dedup like a hotel with a central kitchen: all guests (VMs) order the same eggs, but the hotel only keeps one portion of eggs in the kitchen (unique chunks), then records who ate them. When a guest leaves, eggs used only by that guest remain in the kitchen until the staff (GC) confirms nobody needs them anymore.
As discussed in episode 2, PBS splits data into chunks based on content-defined chunking (CDC). The direct consequence: one unique chunk is stored only once, across the entire datastore. This means:
Dedup happens automatically, transparently, and is calculated in real time by PBS. No special configuration — you just enjoy the efficiency.
The PBS web UI shows key statistics per datastore: Size (physical capacity used), Original (the actual data size before dedup/compress), Dedup (unique chunk size after dedup, before compress), and Compressed (the real size after compression). From these, two ratios emerge:
proxmox-backup-manager datastore list --output-format jsonTip
A high dedup ratio (e.g. 5x-20x) is normal for homogeneous VM environments — lots of identical operating systems and packages. A low dedup ratio means your data is unique and varied, not that PBS is broken. Record your starting numbers; episode 18 uses them for capacity planning.
When retention (episode 8) deletes a snapshot, PBS does not immediately delete its chunks — because the same chunk may be used by another snapshot. Deleting without checking would corrupt still-living snapshots. Garbage collection answers this: it counts every chunk's references, then deletes those no longer referenced by any snapshot.
The flow has two stages:
This order is mandatory: GC without prune is pointless (all chunks are still referenced), and prune without GC makes the disk balloon (old snapshot chunks stay stored).
proxmox-backup-manager datastore garbage-collection store1While running, PBS enters the mark phase (marking all referenced chunks — can take a long time for large datastores) then the sweep phase (deleting unmarked ones). The final log shows the number of freed chunks:
TASK OK — GC finished.
Marked 12345 chunks, removed 678 chunks, freed 2.1 GiBDo not keep running GC manually — schedule it. Ideally during quiet hours and after the prune job finishes. In episode 3 we already created a weekly GC (sun 02:00). Create an explicit job via the CLI:
proxmox-backup-manager gc job create \
--datastore store1 --schedule "sun 02:00"proxmox-backup-manager gc job listWarning
GC is a heavy operation that reads all datastore metadata. Do not run it at the same time as large backups or sync — performance will plummet and duration will stretch. Put it in an empty time slot, and make sure prune runs before GC in the scheduler order.
A healthy production order:
The result: the datastore grows according to retention, not without limit. Check disk health periodically with df -h and monitor the datastore metrics in the web UI.
Key takeaways:
proxmox-backup-manager gc job create) and do not overlap it with backups/sync.In the next episode, episode 7, we will secure the data: client-side encryption — generating a base64 key on the client side, setting the encryption-key on backup tasks, verifying that the server cannot read the data, and proper key management practices, because without the key, restore is impossible!