Anyone running Proxmox Backup Server (PBS) with client-side encryption in production hits the same moment sooner or later: the encryption key has been sitting unchanged in the vault for three years, the engineer who originally created it is long gone, and at the next ISO 27001 pre-audit the auditor asks when the key was last rotated. The answer so far: never. From there on it gets uncomfortable.
Key rotation in a PBS environment is not rocket science — you just need to understand what PBS actually does and what it does not. Above all: rotation does not mean “re-encrypt all old backups”. On a datastore with multiple terabytes of chunks and months of snapshots that is usually economically pointless and operationally risky. Rotation means: from a specific cut-off date, new backups are encrypted with a new key, the old key is cleanly archived, and both facts are documented.
This article shows how we handle it at DATAZONE in customer environments — pragmatic, traceable, audit-proof.
Why Rotate PBS Encryption Keys at All
A key that never changes is not a cryptographic problem — AES-256 is not broken after five years of use. The problem lies elsewhere:
Staff turnover. Every admin who has ever seen the key or pulled it from a password manager entry still knows it de facto. After a job change or termination that is a risk only a key rotation can close. The longer a key has been in circulation, the larger the group that could in theory still have it.
Suspected compromise. Was the jump host that held the key file hacked? Did an admin share the key in a chat that has since appeared in a data leak? In such cases rotation is not just good hygiene — it is mandatory.
Audit and compliance requirements. ISO 27001, TISAX, NIS-2 and industry-specific frameworks require documented key lifecycles. A key with no rotation history shows up as a finding in the audit report — regardless of how cryptographically sound the key is.
Separation of old and new data sets. When a datastore should be split into logical periods (e.g. “archive data up to the 2024 financial close, start a fresh series from 2025”), a key change is a clean cut. Old snapshots with the old key, new ones with the new key.
We have covered the general encryption and key hygiene background in Backup Encryption: Key Management Done Right. This article goes one level deeper into the PBS-specific workflow.
What PBS Actually Does When Encrypting
Short version for anyone not working with the PBS mechanism daily: encryption happens on the client side. The PBS server only ever sees encrypted chunks, the key never leaves the client (hypervisor or physical host). That is why PBS still works as a safe off-site target even when the server lives at a hoster or in a partner datacentre.
The key is created with proxmox-backup-client key create and ends up as a JSON file — by default at ~/.config/proxmox-backup/encryption-key.json for the root user, in PVE-integrated setups often under /etc/pve/priv/. The file contains the actual AES-256 key plus an optional passphrase wrap. Importantly: a PBS client can know several keys at the same time — each --keyfile argument can point to a different file. That is the foundation for clean rotation.
On the server side, PBS stores the key fingerprints that encrypted each snapshot in its manifest. On restore, exactly that fingerprint is expected. Anyone keeping old and new keys available can therefore restore snapshots from both periods at any time — the PBS client automatically picks the right key via the fingerprint from the available keyring files.
The Clean Rotation Workflow in Seven Steps
This is how we implement key rotation in customer environments where we have been running PBS for several years to protect Proxmox clusters, file servers and Veeam object-storage replicas:
Step 1 — Create the new key. On a clean, documented admin host:
proxmox-backup-client key create /root/pbs-keys/pbs-2026-11.key \
--kdf scrypt
The passphrase is assigned separately and immediately transferred to the central secret management system (Vaultwarden, Vault or KeePassXC with YubiKey). The filename carries the rotation date as a mandatory naming convention — no guessing games in operations.
Step 2 — Record the fingerprint. Use proxmox-backup-client key info /root/pbs-keys/pbs-2026-11.key to read the fingerprint and enter it into the key register (a table: fingerprint, creation date, responsible admin, vault entry, planned end of use).
Step 3 — Secure the second and third copy. We apply 3-2-1 to keys as well. Concretely: one copy in the primary Vaultwarden, one copy in an offline KeePass on an encrypted USB token in the safe, one paper copy (Base64 dump plus passphrase) in a bank safe deposit box. The latter is the backstop that survives any ransomware night.
Step 4 — Rekey the backup jobs. In Proxmox VE, point the keyfile parameter in /etc/pve/storage.cfg on the storage definitions to the new key. For backup jobs via the PVE GUI it is enough to adjust the datastore configuration; for scripts and vzdump hooks the path is overwritten directly. From the next run onward, new snapshots are encrypted with the new key.
Step 5 — Test restore with the new key. Do not skip this. Before switching to production, restore a VM snapshot that was taken with the new key and verify the VM boots. In environments with sensitive data a dedicated scratch datastore is worth it, so you can test without risk.
Step 6 — Archive the old key, do not delete it. The old key stays in the Vaultwarden entry with the note “ARCHIVE — used until DD.MM.YYYY, restore-capable for snapshots up to DD.MM.YYYY”. Do not rename, do not move — only change the status. Only after the retention period of the encrypted snapshots has expired may the old key be deleted.
Step 7 — Document the change and create audit evidence. Date, person responsible, reason for rotation (planned or incident-driven), tested restore cases. This documentation is what turns an “open item” into a “demonstrably completed item” in every audit.
Rotation Frequency: How Often Makes Sense
There is no hard standard for PBS key rotation, but a pragmatic recommendation from our practice:
- Standard SMB environment, no compliance pressure: every 24 months, plus on personnel changes with key access
- ISO 27001 or TISAX in preparation: annually, plus incident-driven
- Highly regulated sectors (finance, healthcare, defence suppliers): every 12 months, additionally on every admin change within 30 days
What matters is less the exact frequency and more the documented, repeatable process. An audit will accept a 24-month rotation with clean evidence more readily than a theoretical annual rotation that was never actually performed.
Common Mistakes We Clean Up Regularly
Mistake 1: Keyfile on the backup target. The classic. The PBS keyfile sits on a share that is itself backed up to PBS. When ransomware hits, backup and key are gone at the same time. Keyfiles never belong on the system they protect.
Mistake 2: Rotation without a test restore. New key is configured, the next backup run starts, two weeks later nobody notices that the new snapshots are unreadable because the keyfile path was wrong. A test restore before the switch is mandatory, not optional.
Mistake 3: Old key deleted too early. An admin thinks “the new key has been running for six months, the old one can go” — and overlooks that the monthly snapshots from the previous year are still encrypted with the old key. All pre-rotation snapshots are then permanently lost.
Mistake 4: No fingerprint documentation. Several keys in circulation, nobody knows which snapshot was encrypted with which key. In the emergency restore situation it then takes 20 minutes to identify the right key — time you do not have in a real incident.
Mistake 5: Passphrase in clear text in a script. --keyfile X --password Y in a cron wrapper. Keyfile and passphrase on the same system, same user, same permissions. That makes the whole encryption practically worthless.
Document Recovery Tests With the Old Key
What should happen once a year in every SMB: restore a snapshot from the pre-rotation period and log it. Do not only test the current key, test the archived one. That is the proof that the archived copy of the old key still works and that the concept is robust. See also our articles Immutable Backups Against Ransomware and the general Backup Strategy for SMBs With Proxmox and TrueNAS.
Anyone new to PBS who wants to set up encryption fundamentals before rotating keys will find the starting point in Setting Up Proxmox Backup Server and — for multi-site environments — in PBS Sync Jobs Across Remote Sites.
How DATAZONE Supports Customers Running PBS
We look after a range of mid-market and industrial customers between Ingolstadt, Augsburg and Munich with PBS setups ranging from 20 TB to 200 TB of datastore. Encryption key rotation is part of our backup service — including documented rotation plans, Vaultwarden integration and annual recovery tests. If PBS runs alongside a TrueNAS appliance as an S3 target or replication destination, the TrueNAS configurator covers the fitting hardware variants; ongoing operations and support are covered by TrueNAS support.
FAQ
Do I have to re-encrypt all old backups during a PBS key rotation?
No, in almost all cases you do not. Rotation means: new backups with the new key from the cut-off date, the old key stays archived for the old snapshots. Only if there is concrete suspicion that the old key is compromised does re-encryption make sense — and even then it is worth checking whether a new backup series with a new key and parallel retention is the more economical option.
What happens if I lose the old key before its snapshots have expired?
The snapshots encrypted with the old key are permanently unreadable. Neither PBS nor Proxmox Server GmbH can reconstruct the key. Hence: at least three copies of the key in separate locations, one of them offline.
How often should I rotate the PBS encryption key?
In standard SMB environments every 24 months plus on personnel changes. In regulated environments (ISO 27001, TISAX, NIS-2) annually. What matters is not the exact frequency but the documented process and proof of execution.
Can I use several keys on the same PBS datastore at the same time?
Yes. Each snapshot stores the key fingerprint that encrypted it in the manifest. On restore, the PBS client automatically selects the matching key from the available keyfiles. That is the foundation on which the rotation described above works.
Is key rotation on PBS mandatory for ISO 27001 or NIS-2?
Both frameworks require documented key lifecycles, but not a rigid frequency. What matters is that there is a defined, implemented and verifiable process. Annual rotation plus documentation is the safe option for audits.
How does PBS key rotation differ from rotation on Restic or Borg?
PBS works with one keyfile per datastore connection and stores the key fingerprint in the snapshot manifest. Restic supports several passphrases per repository with restic key add/remove, Borg works similarly. Conceptually the same — technically different tools and workflows. The rotation principles (do not re-encrypt old backups, archive the old key instead of deleting, test recovery) apply equally to all three.
More on these topics:
More articles
Proxmox VE 9.3: SAN view, multipath and volume-chain snapshots – what it means for TrueNAS
Proxmox VE 9.3 is here: SAN view, multipath and shared LVM via wizard, volume-chain snapshots in production. What it means for TrueNAS over iSCSI.
Proxmox LXC vs. VM 2026: The Decision Guide After a Year with PVE 9
Container or VM on Proxmox? After a year with PVE 9 we show when LXC wins, when a KVM VM is required – with OCI support, container live migration and decision matrix.
Proxmox Datacenter Manager in production: five tips after one year of multi-cluster operation
Five hands-on PDM tips from a year of running Proxmox Datacenter Manager across multiple clusters: clean SSO, per-cluster roles, migration workflow, alerts, backup status.