This episode hardens PBS against the most serious threat in the modern backup world — ransomware: a combination of client-side encryption, append-only/immutable datastores via read-only ZFS snapshots, and off-site backup. You will also learn key rotation and task log auditing as ongoing security practices.

The firewall in episode 13 closes entry points from the network — but the biggest threat to modern backups actually comes from within: ransomware attacking hosts, PVE, even the backup server itself. Successful ransomware will try to encrypt everything it can reach, including your backups. Episode 14 builds repository security & anti-ransomware.
Imagine it like a safe with a double lock and copies in two cities: the double lock (client-side encryption) means a thief cannot read the contents; a safe cabinet that can be permanently locked (immutable) prevents a thief from overwriting the contents; and copies in another city (off-site) ensure an untouched version exists.
The foundation from episode 7 applies here: data is encrypted on the client, so even a compromised server stores no readable data. Ransomware that successfully gets into PBS only finds ciphertext that is useless to it — and for the victim, the key remains safely stored out of reach.
Encryption protects confidentiality, but integrity and availability need another layer: an immutable datastore snapshot — one that cannot be modified or deleted, even by a process with root access.
If the datastore is on ZFS, take pool snapshots periodically and make them read-only:
zfs snapshot rpool/data@pbs-2026-08-13
zfs set readonly=on rpool/data@pbs-2026-08-13readonly=on makes the snapshot unmodifiable. Any process — including a malicious script running as root — cannot write to it. This is a form of append-only/immutable storage: old data can always be read, never overwritten.
Schedule this snapshot (e.g. zfs-auto-snapshot or cron) before/alongside the backup job, then monitor via zfs list -t snapshot.
Warning
An immutable ZFS snapshot only protects the data inside the snapshot, not the active pool. Combine it with healthy PBS retention and make sure the number of ZFS snapshots does not burden the pool — snapshots hold back old blocks, so new space is limited. Test the ZFS snapshot rollback procedure in the lab before relying on it.
Even immutable snapshots are not immune to location destruction. Patient ransomware can delete old snapshots from within (with root access) before attacking. Off-site backup from episode 10 closes this: a copy on a remote PBS that is network-separated and (ideally) isolated from admin access — if the primary location is cleaned by an attack, the remote remains intact.
Keys are not forever. Rotate keys periodically and on specific events:
Rotation practice in PBS: create a new key (proxmox-backup-client key generate --keyfile), use it for the next backups, and keep the old key as long as old snapshots exist — snapshots encrypted with the old key can only be opened with the old key. Plan a transition window before destroying the old key.
proxmox-backup-client key generate --keyfile /etc/proxmox-backup/enc-v2.keyRansomware rarely works silently — its traces are visible in logs if you look for them. Make auditing a habit:
proxmox-backup-manager task list) for suspicious activity: backups/restores/deletes at odd hours.journalctl -u proxmox-backup) and firewall logs.proxmox-backup-manager task list --since '3 days ago'Tip
The real measure of anti-ransomware defense is how fast you can detect and recover. Simulate an "all VMs encrypted" scenario in the lab: disable access, restore from an immutable snapshot or the remote PBS, and time it. This drill is part of the production checklist in episode 22.
Key takeaways:
readonly=on ZFS snapshot makes the datastore immutable — not even root can overwrite it.In the next episode, episode 15, we will choose and optimize the storage medium: backup storage ZFS, ext4 & SMB/NFS — ZFS compression and checksums, the recordsize 1M best practice for backups, ext4 + LVM scenarios, and the performance trade-offs when using NFS/SMB, complete with capacity calculation. The right storage makes PBS dance!