If you run Proxmox VE, you need Proxmox Backup Server. PBS is not optional — it’s the difference between “I lost a VM” and “I restored from yesterday’s backup in five minutes.”
This guide covers every deployment method (bare-metal, LXC, Docker), datastore setup with ZFS, client configuration, automatic verification, pruning, and offsite sync. By the end you’ll have a backup system that runs itself.
Why PBS Instead of a Simple vzdump Cron Job
Proxmox ships with vzdump, and a cron job to dump VMs to an NFS share
will technically work. But PBS gives you:
- Deduplication — identical blocks across VMs are stored once.
- Incremental forever — after the first full backup, PBS only transfers changed blocks. Subsequent backups take seconds.
- CRC verification — every chunk is checksummed and verified.
- Encryption at rest — client-side encryption before data leaves the Proxmox host.
- Fast restore — restore a single file, a directory, or a full VM without extracting a giant archive.
A 50 GB VM with daily changes of ~500 MB takes a 50 GB initial backup and ~500 MB increments. With vzdump to NFS, every backup is 50 GB. Within a week you’ve saved 300 GB+ with PBS.
Deployment Option 1: Install PBS Directly on Proxmox Host (Not Recommended)
Installing PBS on the same host you’re backing up defeats the purpose. If the host dies, you lose both the VMs and the backups. Don’t do this unless you have absolutely no second machine.
If you must, add the PBS repository:
|
|
Deployment Option 2: Dedicated PBS LXC Container (Recommended for Homelabs)
The best option for most homelabs: a lightweight LXC on a separate Proxmox host, or a privileged container with ZFS mount passthrough.
Step 1 — Create the LXC Container
Use the Proxmox web UI or CLI to create a container:
|
|
Key flags:
--unprivileged 0— PBS needs direct disk access for ZFS datastores--features nesting=1— allows mount inside the container--features fuse=1— enables FUSE support for external backup targets
Step 2 — Pass Through the Backup Storage
On the Proxmox host, identify your backup disk:
|
|
If it’s a dedicated disk (e.g., /dev/sdb), add it to the container:
|
|
For ZFS pools, use bind mounts. On the host:
|
|
Step 3 — Install PBS Inside the Container
|
|
PBS web interface is now available at https://<container-ip>:8007.
Deployment Option 3: PBS in Docker (Minimal Resource Usage)
PBS can run in Docker with minimal overhead. This is useful if you don’t want a dedicated LXC but have Docker on a secondary machine.
|
|
Note: PBS in Docker requires privileged: true and network_mode: host
for proper ZFS and network performance. Some features (like ZFS native
datastores inside the container) may not work — use ext4 or XFS on the
bind-mounted directory instead.
Configuring ZFS Datastores
A ZFS datastore gives you compression, deduplication (at the pool level), snapshots, and checksums on the storage side.
Option A: ZFS on the Host, Datastore on a Directory
Set up the pool on the host, mount it into the PBS container, then configure the datastore as a plain directory:
|
|
In the PBS web UI:
- Administration → Storage → Add Datastore
- Name:
backup-store - Path:
/mnt/backup-pool/backup-store - Verify new backups:
Yes - Set notification mode as desired
Option B: ZFS Pool Directly in PBS (Bare Metal Only)
When PBS runs on bare metal or a VM with direct disk access:
|
|
Zstd compression at level 9 gives excellent ratios for VM disk images with minimal CPU overhead on modern hardware.
Configuring Proxmox VE Clients
Step 1 — Add PBS as a Storage Target
In the Proxmox VE web UI:
- Datacenter → Storage → Add → Proxmox Backup Server
- ID:
pbs-remote - Server:
<pbs-ip>(or hostname) - Datastore:
backup-store - Username:
root@pam(or a dedicated PBS user) - Password:
<password> - Fingerprint: Copy from PBS web UI → Dashboard → Fingerprint
Or via the CLI:
|
|
Step 2 — Schedule Backups Per VM
|
|
Or use the web UI: Datacenter → Backup → Add.
Step 3 — Verify the Connection
|
|
Setting Up Verification and Pruning
PBS doesn’t verify backups by default. Configure automatic verification so you know your backups are restorable before you need them.
Verification Schedule
In PBS web UI: Datastore → Options → Verification Schedule.
Set it to:
verify-new: true # Verify immediately after creation
verify-existing: true # Reverify existing backups
verify-schedule: sun 03:00 # Weekly full verification on Sundays
Or via CLI:
|
|
Add a systemd timer for verification:
|
|
Pruning (Retention) Policy
Pruning removes old backups based on retention rules. This is separate from garbage collection — pruning marks chunks for deletion, GC actually removes them.
Recommended homelab retention:
|
|
| Retention | What It Saves | Storage Impact |
|---|---|---|
--keep-last 3 |
3 most recent backups | Low — ensures quick recovery |
--keep-daily 7 |
Last 7 daily backups | ~3-7 GB/day depending on changes |
--keep-weekly 4 |
4 weekly backups (Sundays) | ~1-2 GB/week increment |
--keep-monthly 2 |
2 monthly backups | Minimal — first of month |
Configure pruning weekly to run after verification:
|
|
Offsite Sync (The 3-2-1 Rule)
PBS has native sync jobs. You can sync to another PBS instance on a second machine, a cloud VPS, or any remote server running PBS.
Remote PBS Sync
On the primary PBS:
|
|
This syncs the last 3 backups of every namespace to the remote PBS every morning at 5 AM. Only changed chunks are transferred — typically a few hundred MB for incremental backups of a 50 GB VM.
Offsite PBS on a Cloud VPS
For the remote end, a cheap 4 GB RAM / 100 GB storage VPS works:
|
|
Make sure the API endpoint is secured:
|
|
You can also use a WireGuard tunnel between the two PBS instances so the sync traffic never touches the public internet:
|
|
Client-Side Encryption
Encrypt backups before they leave the Proxmox host. PBS supports encryption keys per backup namespace.
Generate an Encryption Key
|
|
The key file contains the encryption key and a recovery password. Store this key file somewhere safe — without it, your encrypted backups are unrecoverable.
Register the Key with PBS
In the web UI: Administration → Encryption Keys → Add.
Or on the Proxmox VE host:
|
|
Now all backups for VM 100 will be encrypted on the client before transmission. PBS stores only encrypted blobs:
|
|
If someone steals the PBS disk, they get encrypted data. Only the key file on the Proxmox host can decrypt it.
Restoring from PBS
Full VM Restore
From the Proxmox VE web UI:
- Select the backup → Restore
- Choose target storage
- Click Restore
From CLI:
|
|
File-Level Restore (Without Restoring the VM)
PBS supports FUSE-based mount for extracting individual files:
|
|
This works for both file-level backups (CT containers) and block-level
backups (VMs — you get a block device that can be mounted with
qemu-nbd).
Restore a Single Container
|
|
Or restore from PBS using the backup content:
|
|
Monitoring and Alerts
PBS emits reports via email by default. Configure SMTP in the web UI at Administration → Notification → Mail Forwarding.
For homelab dashboards, expose PBS metrics to Prometheus:
|
|
PBS also writes structured logs to the systemd journal:
|
|
For Telegram or Discord alerts, create a passive check script:
|
|
Garbage Collection
PBS uses reference-counted chunk storage. When you prune old backups, chunks are marked for deletion but not immediately removed. Garbage collection reclaims this space.
Run GC weekly after pruning:
|
|
Or schedule it:
|
|
GC is I/O intensive. Running it on Sunday morning (after verification and pruning) means the week’s active chunk data is settled and you have the weekend to re-index.
Putting It All Together: The Complete Backup Pipeline
Here’s the weekly pipeline in chronological order:
Sunday 03:00 — Verify existing backups (checksum all chunks)
Sunday 04:00 — Prune old backups (mark chunks for deletion)
Sunday 05:00 — Garbage collection (reclaim disk space)
Daily 02:00 — Backup all VMs (incremental snapshot mode)
Daily 05:00 — Sync last 3 backups to offsite PBS
Total GC/reclaim time for a 1 TB datastore running 15 VMs: ~10-15 minutes. Daily backup window: 2-5 minutes per VM depending on change rate. Sync window: 10-20 MB/s over a 1 Gbps link.
Complete Bootstrap Script
Run this on a fresh PBS to get everything configured at once:
|
|
Summary
Proxmox Backup Server transforms backup from “I hope this works” to “I know this works.” The key takeaways:
- Dedicated PBS is worth it — separate machine or LXC on a different host. Never co-locate backups and production on the same server.
- ZFS datastores with zstd compression give excellent storage efficiency. A 100 GB pool of VMs typically compresses to 40-60 GB.
- Verify, prune, and GC on a schedule — verification is the only way to know backups are restorable before disaster strikes.
- Sync offsite — even a cheap VPS with 100 GB of storage gives you the third copy that makes 3-2-1 real.
- Client-side encryption ensures confidentiality even if the backup disk leaves your control.
PBS runs itself once configured. The systemd timers handle everything: daily backups, weekly verification and pruning, and offsite sync. Your job is to check the dashboard once a week and confirm the last backup timestamp is fresh.