This episode secures backup data with client-side encryption: creating a base64 key on the client side, pointing it to PVE/PBS backup tasks, and verifying that the server only stores unreadable ciphertext. You will also learn proper key management — because without the key, restore is impossible.

After dedup and GC saved storage in episode 6, now we talk about confidentiality. Backup data is a full copy of your entire system — if the backup server falls into the wrong hands, everything you protect is exposed too. Episode 7 closes this gap with client-side encryption: data is encrypted before it leaves the client, so the PBS server itself never sees plaintext.
Imagine it like storing notes in invisible ink: the one storing the notes (the PBS server) only sees unreadable scribbles. The only reading key is in your hands (the client). If the key is lost, those notes remain unreadable forever — no warehouse technician can help.
The core PBS principle: the key only exists on the client side. During backup, the client encrypts each chunk with the key before sending it. The server receives, stores, and manages pure ciphertext. The server cannot even verify snapshot contents (which is why verify jobs in episode 9 can only validate chunk integrity, not read them without a key).
The benefit is huge: a PBS admin, an attacker who breaks into the server, or a storage provider who steals the disk will get nothing readable. The data stays safe even if the server is fully compromised.
The key is created on the client side, not the server:
proxmox-backup-client key generate \
--keyfile /etc/proxmox-backup/enc.keyproxmox-backup-client key generate produces a base64-formatted key. Optionally, you can create a password-encrypted key (--kdf-iterations for derivation iterations) — safe if the keyfile falls into the wrong hands, but it requires you to remember the password.
In PVE, the keyfile is attached to the PBS storage. From the CLI, add the encryption-key-file option to the storage:
pvesm set pbs1 --encryption-key-file /etc/proxmox-backup/enc.keyIn the PVE web UI: Datacenter → Storage → pbs1 → Edit, fill Encryption Key File with the keyfile path on the PVE node. All backups using this storage are automatically encrypted. For direct proxmox-backup-client, the key is pointed to via --keyfile:
proxmox-backup-client backup etc.pxar:/etc \
--repository backup@pbs@10.0.1.10:store1 \
--keyfile /etc/proxmox-backup/enc.keyImportant
The keyfile must exist on every client performing backups and every host that will restore. If the keyfile is lost, encrypted snapshots become permanently useless — there is no backdoor, no bypass. Treat the keyfile like the most important root password in your environment.
How do you prove encryption is really active? Check from the server side that the stored data is ciphertext:
ls -la /var/lib/proxmox-backup/datastore/store1/chunk
xxd /var/lib/proxmox-backup/datastore/store1/chunk/.../....chunk | headThe chunk contents will look random (ciphertext), not readable data. Stronger proof: try a restore without the key from a client — proxmox-backup-client restore will fail with a key-related error because PBS cannot decrypt. Try a restore with the key: the data comes back intact.
Rule number one: the key must not exist in only one place. Make several copies:
Every time a key is replaced (rotated), update all copies — old snapshots use the old key, so keep the old key as long as old snapshots exist.
This is the most important consequence of client-side encryption: without the key, there is no restore, and no support can help. Make sure the key storage procedure is documented in the team runbook. Before replacing personnel who hold the key, rotate the key and distribute the new one.
Warning
Do not store the keyfile in the same PBS datastore (let alone inside a VM that is backed up to that PBS). The keyfile must live outside the failure domain of the data it protects — otherwise your "safe backup" can be lost in a single incident.
Key takeaways:
proxmox-backup-client key generate --keyfile.encryption-key-file on PVE storage or --keyfile on the client.In the next episode, episode 8, we will manage the snapshot lifecycle: retention & prune policy — understanding keep-last, keep-daily, keep-weekly, and keep-monthly per backup group, how sync jobs maintain retention on the remote side, and adjusting the policy to your RPO/RTO targets. Storage will grow in balance, not wild!