Backup intermediate ⏱ 60 minutes

Proxmox Backup Server: Complete VM Backup Solution

Enterprise-grade VM backups for Proxmox. Deduplication, encryption, and easy restores.

By homelabbing.io • 2025-12-17
#proxmox#pbs#backup#vm#deduplication

Proxmox Backup Server (PBS) is an enterprise-class backup solution specifically designed for Proxmox Virtual Environment (PVE). It provides deduplicated, encrypted, and verified backups of VMs and containers with exceptional efficiency.

Why Proxmox Backup Server?

PBS offers unique advantages for Proxmox environments:

  • Native Proxmox integration: Built specifically for PVE, seamless setup
  • Incremental backups: Only changed blocks are transferred and stored
  • Deduplication: Content-defined chunking across all backups
  • Encryption: Client-side encryption with master key support
  • Verification: Automatic backup verification ensures integrity
  • Web interface: Full management through intuitive GUI
  • Tape support: Enterprise tape library integration for long-term archival
  • Fast restores: Instant VM recovery from deduplicated backups
  • Efficient storage: Multiple full backups with minimal space usage
  • Live backups: No VM downtime during backup operations

Architecture Overview

PBS consists of:

  1. Proxmox Backup Server: Standalone server receiving and storing backups
  2. Proxmox VE hosts: Source systems running VMs and containers
  3. Datastores: Storage locations for backup data
  4. Namespaces: Organizational units within datastores
  5. Backup jobs: Automated scheduled backup tasks

Part 1: Installing Proxmox Backup Server

Hardware Requirements

Minimum recommended specs:

  • CPU: 2 cores (4+ recommended for deduplication)
  • RAM: 4GB minimum (8GB+ recommended, more for larger datastores)
  • Storage: Separate OS disk + large data storage
  • Network: 1Gbps minimum (10Gbps for production)

Storage sizing:

  • Plan for 10-30% of source data with deduplication
  • Add 20% overhead for metadata and growth
  • Use ZFS for data integrity and snapshots

Installation Options

Option A: Dedicated ISO Installation (Recommended)

Download PBS ISO:

# Visit https://www.proxmox.com/en/downloads
# Download Proxmox Backup Server ISO

Installation steps:

  1. Boot from PBS ISO
  2. Select “Install Proxmox Backup Server”
  3. Accept license agreement
  4. Select target disk for OS
  5. Configure timezone and keyboard
  6. Set admin password and email
  7. Configure network (static IP recommended)
  8. Review and install

After installation:

# Access web interface
https://YOUR-PBS-IP:8007

# Login with root and your password

Option B: Install on Debian 12

Add PBS repository to Debian 12:

# Update system
apt update && apt upgrade -y

# Add PBS repository
echo "deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription" > /etc/apt/sources.list.d/pbs-no-subscription.list

# Add Proxmox GPG key
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg

# Update package lists
apt update

# Install Proxmox Backup Server
apt install proxmox-backup-server -y

# Reboot
reboot

Post-Installation Configuration

Disable enterprise repository (if not subscribed):

# Edit enterprise repo
echo "# deb https://enterprise.proxmox.com/debian/pbs bookworm pbs-enterprise" > /etc/apt/sources.list.d/pbs-enterprise.list

# Update
apt update

Update system:

apt update && apt dist-upgrade -y

Part 2: Initial PBS Configuration

Web Interface Access

Access PBS web interface:

https://YOUR-PBS-IP:8007

Login with:

  • Username: root
  • Password: Your root password

Create Datastore

A datastore is where backups are stored.

Via Web Interface:

  1. Navigate to Datastore in left menu
  2. Click Add Datastore
  3. Configure:
    • Name: backup-store
    • Backing Path: /mnt/datastore/backup-store
    • GC Schedule: daily at 03:00
    • Prune Schedule: daily at 04:00
    • Verify Schedule: weekly on Sunday at 05:00
  4. Click Create

Via CLI:

# Create directory for datastore
mkdir -p /mnt/datastore/backup-store

# Create datastore
proxmox-backup-manager datastore create backup-store /mnt/datastore/backup-store

Configure Garbage Collection

Garbage collection removes unused chunks:

# Set GC schedule
proxmox-backup-manager datastore update backup-store     --gc-schedule "daily"     --prune-schedule "daily"

Via web interface:

  1. Select datastore
  2. Go to Options
  3. Edit GC Schedule
  4. Set to daily at 03:00

Part 3: Storage Configuration

ZFS provides excellent features for backup storage:

Create ZFS pool:

# Install ZFS
apt install zfsutils-linux -y

# Create pool (adjust disk names)
zpool create -o ashift=12 backup-pool /dev/sdb

# Create dataset
zfs create backup-pool/datastore

# Set compression
zfs set compression=lz4 backup-pool/datastore

# Set deduplication (optional, requires lots of RAM)
# Only enable if you have 5GB+ RAM per TB of storage
# zfs set dedup=on backup-pool/datastore

# Create datastore
proxmox-backup-manager datastore create backup-store /backup-pool/datastore

ZFS tuning for backups:

# Disable access time updates
zfs set atime=off backup-pool/datastore

# Set recordsize for large files
zfs set recordsize=1M backup-pool/datastore

# Enable automatic snapshots (via sanoid/syncoid)
apt install sanoid -y

LVM Thin Provisioning

Alternative to ZFS:

# Create physical volume
pvcreate /dev/sdb

# Create volume group
vgcreate backup-vg /dev/sdb

# Create thin pool
lvcreate -L 50G -T backup-vg/backup-pool

# Create logical volume
lvcreate -V 2T -T backup-vg/backup-pool -n backup-lv

# Format with ext4
mkfs.ext4 /dev/backup-vg/backup-lv

# Mount
mkdir -p /mnt/datastore
mount /dev/backup-vg/backup-lv /mnt/datastore

# Add to fstab
echo "/dev/backup-vg/backup-lv /mnt/datastore ext4 defaults 0 2" >> /etc/fstab

Network Storage

Mount NFS or CIFS for datastore:

NFS:

# Install NFS client
apt install nfs-common -y

# Create mount point
mkdir -p /mnt/nfs-backup

# Mount NFS share
mount -t nfs nas.local:/backup /mnt/nfs-backup

# Add to fstab
echo "nas.local:/backup /mnt/nfs-backup nfs defaults 0 0" >> /etc/fstab

# Create datastore
proxmox-backup-manager datastore create nfs-backup /mnt/nfs-backup

Part 4: User and Permission Management

Create Backup Users

Via Web Interface:

  1. Navigate to Configuration → Access Control → User Management
  2. Click Add
  3. Configure:
  4. Click Create

Via CLI:

# Create user
proxmox-backup-manager user create pve-backup@pbs     --email [email protected]     --password "StrongPassword123"

Create API Tokens

API tokens provide secure authentication without passwords:

# Create API token
proxmox-backup-manager user token add pve-backup@pbs token1     --output-format json

Save the token ID and secret securely.

Configure Permissions

Via Web Interface:

  1. Go to Configuration → Access Control → Permissions
  2. Click Add → User Permission
  3. Configure:
    • Path: /datastore/backup-store
    • User: pve-backup@pbs
    • Role: DatastoreBackup
  4. Click Add

Via CLI:

# Grant datastore backup permission
proxmox-backup-manager acl update /datastore/backup-store     --auth-id pve-backup@pbs     --role DatastoreBackup

Part 5: Connecting Proxmox VE to PBS

Add PBS Storage in Proxmox VE

Via Proxmox VE Web Interface:

  1. Navigate to Datacenter → Storage
  2. Click Add → Proxmox Backup Server
  3. Configure:
    • ID: pbs-backup
    • Server: YOUR-PBS-IP
    • Username: pve-backup@pbs
    • Password: User password or API token
    • Datastore: backup-store
    • Namespace: (optional) production
    • Fingerprint: Verify and accept
  4. Click Add

Via CLI on PVE:

# Add PBS storage
pvesm add pbs pbs-backup     --server YOUR-PBS-IP     --datastore backup-store     --username pve-backup@pbs     --password "StrongPassword123"     --fingerprint "FINGERPRINT-FROM-PBS"

Get PBS fingerprint:

# On PBS server
proxmox-backup-manager cert info | grep Fingerprint

Verify Connection

On Proxmox VE:

# List PBS storage
pvesm status

# Test connection
pvesm list pbs-backup

Part 6: Creating Backups

Manual VM Backup

Via Proxmox VE Web Interface:

  1. Select VM
  2. Click Backup
  3. Click Backup now
  4. Configure:
    • Storage: pbs-backup
    • Mode: Snapshot (recommended)
    • Compression: ZSTD (fast and efficient)
    • Notification: Email on failure
  5. Click Backup

Via CLI:

# Backup VM 100
vzdump 100 --storage pbs-backup --mode snapshot --compress zstd --remove 0

Backup Modes

Snapshot (Recommended):

  • Uses LVM/ZFS snapshots
  • Consistent backups
  • Minimal downtime
  • Requires snapshot-capable storage
vzdump 100 --mode snapshot

Suspend:

  • Suspends VM during backup
  • Guaranteed consistency
  • Brief downtime
vzdump 100 --mode suspend

Stop:

  • Stops VM completely
  • Maximum consistency
  • Full downtime during backup
vzdump 100 --mode stop

Compression Options

ZSTD (Recommended):

  • Fast compression
  • Good ratio
  • Low CPU usage
vzdump 100 --compress zstd

LZO:

  • Very fast
  • Lower compression ratio
  • Minimal CPU
vzdump 100 --compress lzo

GZIP:

  • Good compression
  • Slower
  • Higher CPU usage
vzdump 100 --compress gzip

Part 7: Automated Backup Jobs

Create Backup Job in Proxmox VE

Via Web Interface:

  1. Navigate to Datacenter → Backup
  2. Click Add
  3. Configure:
    • Node: Select node
    • Storage: pbs-backup
    • Schedule: daily at 02:00
    • Selection: Select VMs/Containers
    • Mode: Snapshot
    • Compression: ZSTD
    • Email: [email protected]
    • Retention: Keep last 7 backups
  4. Click Create

Via CLI:

# Create backup job configuration
cat > /etc/pve/vzdump.cron << 'EOF'
# Backup all VMs daily at 2 AM to PBS
0 2 * * * root vzdump --all --storage pbs-backup --mode snapshot --compress zstd --mailnotification failure --mailto [email protected]
EOF

Backup Selection

All VMs and containers:

vzdump --all --storage pbs-backup

Specific VMs:

vzdump 100,101,102 --storage pbs-backup

VMs with specific pool:

vzdump --pool production --storage pbs-backup

Exclude specific VMs:

vzdump --all --exclude 999 --storage pbs-backup

Part 8: Backup Retention and Pruning

Configure Retention in PVE

When creating backup jobs, set retention:

vzdump 100 --storage pbs-backup     --prune-backups keep-last=7,keep-weekly=4,keep-monthly=3

Retention format:

keep-last=N       # Keep last N backups
keep-hourly=N     # Keep N hourly backups
keep-daily=N      # Keep N daily backups
keep-weekly=N     # Keep N weekly backups
keep-monthly=N    # Keep N monthly backups
keep-yearly=N     # Keep N yearly backups

Prune Schedule in PBS

Configure automatic pruning in PBS datastore:

Via Web Interface:

  1. Select datastore
  2. Go to Prune & GC
  3. Click Edit
  4. Configure:
    • Keep Last: 7
    • Keep Daily: 7
    • Keep Weekly: 4
    • Keep Monthly: 12
    • Keep Yearly: 3
  5. Click OK

Via CLI:

# Set prune options for namespace
proxmox-backup-client prune     --repository pve-backup@pbs@YOUR-PBS-IP:backup-store     --keep-last 7     --keep-daily 7     --keep-weekly 4     --keep-monthly 12     --keep-yearly 3

Part 9: Restoring VMs and Containers

Restore via Proxmox VE Web Interface

  1. Navigate to PBS storage
  2. Click Content
  3. Select backup
  4. Click Restore
  5. Configure:
    • VM ID: New ID or overwrite
    • Storage: Target storage
    • Unique: Generate new MAC addresses
  6. Click Restore

Restore via CLI

Full VM restore:

# Restore to new VM ID
qmrestore pbs-backup:backup/vm/100/2025-12-17T02:00:00Z 200

# Restore and overwrite existing VM
qmrestore pbs-backup:backup/vm/100/2025-12-17T02:00:00Z 100 --force

Container restore:

pct restore 200 pbs-backup:backup/ct/101/2025-12-17T02:00:00Z

Restore Individual Files

Mount VM backup and extract files:

# Install fuse
apt install fuse -y

# Create mount point
mkdir -p /mnt/pbs-restore

# Mount backup (example with VM 100)
# This requires proxmox-backup-file-restore
proxmox-backup-file-restore mount     pbs-backup:vm/100/2025-12-17T02:00:00Z     /mnt/pbs-restore

# Browse files
ls /mnt/pbs-restore

# Copy needed files
cp -r /mnt/pbs-restore/path/to/file /restore/location/

# Unmount
umount /mnt/pbs-restore

Part 10: Encryption and Security

Client-Side Encryption

Enable encryption for backups:

Create encryption key in PBS:

  1. Navigate to Configuration → Encryption Keys
  2. Click Add
  3. Configure:
    • Key ID: backup-key-2025
    • Password: Strong password
  4. Click Create
  5. Download and save the key file securely

Use encryption key in PVE:

When adding PBS storage, specify encryption key:

pvesm set pbs-backup --encryption-key "backup-key-2025"

Via backup job:

vzdump 100 --storage pbs-backup     --notes-template "{{guestname}}"     --encrypt 1

Master Key Configuration

Create master key for key management:

# On PBS, generate master key
proxmox-backup-manager key create master-key

# Show master key
proxmox-backup-manager key show master-key

# Export and save securely!
proxmox-backup-manager key paperkey master-key > master-key-paperkey.txt

Access Control Best Practices

  1. Separate users per PVE node: Different credentials for each source
  2. Use API tokens: More secure than passwords
  3. Minimal permissions: Only grant DatastoreBackup role
  4. Enable 2FA: Add two-factor authentication for admin access
  5. Regular audits: Review access logs periodically

Part 11: Verification and Integrity

Automatic Verification

Configure verification schedule:

Via Web Interface:

  1. Select datastore
  2. Go to Prune & GC
  3. Click Verify Schedule
  4. Set to weekly on Sunday at 05:00
  5. Click OK

Via CLI:

# Set verification schedule
proxmox-backup-manager datastore update backup-store     --verify-new true

Manual Verification

Verify specific backup:

# List backups
proxmox-backup-manager backup list backup-store

# Verify backup
proxmox-backup-client verify     --repository backup-store     vm/100/2025-12-17T02:00:00Z

Verification Reports

View verification status:

  1. Navigate to datastore
  2. Click Verify Jobs
  3. View verification results and logs

Part 12: Monitoring and Alerting

Email Notifications

Configure email in PBS:

Via Web Interface:

  1. Navigate to Configuration → Notifications
  2. Click Add → SMTP
  3. Configure:
    • Name: email-alerts
    • Server: smtp.gmail.com
    • Port: 587
    • Username: Your email
    • Password: App password
    • From Address: [email protected]
  4. Click Add

Test notification:

proxmox-backup-manager notify test-target email-alerts

Datastore Monitoring

Check datastore status:

# Via CLI
proxmox-backup-manager datastore status

# Detailed status
proxmox-backup-manager datastore list

Via web interface:

Dashboard shows:

  • Available space
  • Number of backups
  • Deduplication factor
  • Last garbage collection
  • Verification status

Set Up Alerts

Configure alerts for:

  • Low disk space
  • Failed backups
  • Failed verification
  • High error rate

Via web interface:

  1. Navigate to Configuration → Notifications
  2. Configure thresholds and recipients

Part 13: Performance Optimization

Bandwidth Limiting

Limit backup bandwidth to avoid network saturation:

In Proxmox VE backup job:

vzdump 100 --storage pbs-backup --bwlimit 50000  # 50 MB/s

In PBS globally:

Edit /etc/proxmox-backup/datastore.cfg:

datastore: backup-store
    path /mnt/datastore/backup-store
    gc-schedule daily
    max-bandwidth-in 100000000   # 100 MB/s
    max-bandwidth-out 100000000

Concurrent Jobs

Limit concurrent backup jobs:

# Edit /etc/vzdump.conf
maxfiles 7
pigz 0
ionice 7
lockwait 180
stopwait 10
maxworkers 4

Storage Performance

For ZFS:

# Optimize ARC size (in /etc/modprobe.d/zfs.conf)
options zfs zfs_arc_max=8589934592  # 8GB

# Disable sync for better performance (less safe)
zfs set sync=disabled backup-pool/datastore

# Enable compression
zfs set compression=lz4 backup-pool/datastore

For XFS:

# Mount with optimal options
mount -o noatime,nodiratime,logbufs=8,logbsize=256k /dev/sdb1 /mnt/datastore

Part 14: Backup to Remote PBS

Sync Between PBS Instances

Create remote sync job for offsite backups:

On destination PBS:

  1. Create sync user and permissions
  2. Get API token

On source PBS:

  1. Navigate to Configuration → Remote
  2. Click Add
  3. Configure:
    • Remote ID: offsite-pbs
    • Host: offsite.example.com
    • Username: sync@pbs
    • Password: API token
    • Fingerprint: Accept
  4. Click Add

Create sync job:

  1. Navigate to Sync Jobs
  2. Click Add
  3. Configure:
    • Remote: offsite-pbs
    • Source Datastore: backup-store
    • Target Datastore: offsite-store
    • Schedule: daily at 04:00
    • Remove vanished: Yes
  4. Click Create

Via CLI:

# Add remote
proxmox-backup-manager remote create offsite-pbs     --host offsite.example.com     --userid sync@pbs     --password "API-TOKEN"

# Create sync job
proxmox-backup-manager sync-job create     --remote offsite-pbs     --remote-store backup-store     --store offsite-store     --schedule daily

Part 15: Tape Backup Integration

PBS supports LTO tape drives for long-term archival.

Configure Tape Drive

Detect tape drives:

# Scan for tape devices
proxmox-tape drive scan

# List detected drives
proxmox-tape drive list

Add tape drive:

proxmox-backup-manager tape drive create lto6-drive     --path /dev/st0     --changer my-changer

Create Media Pool

# Create media pool
proxmox-backup-manager tape pool create archive-pool     --allocation 100G

Backup to Tape

Create tape backup job:

proxmox-backup-manager tape backup-job create     --store backup-store     --pool archive-pool     --schedule weekly     --notify-user root@pam

Part 16: Advanced Configuration

Namespaces

Organize backups with namespaces:

Create namespace:

proxmox-backup-manager namespace create backup-store/production
proxmox-backup-manager namespace create backup-store/development

Use in PVE:

When adding PBS storage, specify namespace:

pvesm add pbs pbs-production     --server YOUR-PBS-IP     --datastore backup-store     --namespace production     --username pve-backup@pbs

Traffic Control

Limit PBS network bandwidth:

# Install traffic control
apt install iproute2 -y

# Limit outgoing traffic to 100 Mbit/s
tc qdisc add dev eth0 root tbf rate 100mbit burst 32kbit latency 400ms

Custom Hooks

Create pre/post backup scripts:

Pre-backup script /usr/local/bin/pbs-pre-backup.sh:

#!/bin/bash
# Snapshot databases before backup
echo "Creating database snapshots..."
# Your database snapshot commands

Post-backup script /usr/local/bin/pbs-post-backup.sh:

#!/bin/bash
# Cleanup after backup
echo "Cleaning up snapshots..."
# Your cleanup commands

Part 17: Troubleshooting

Common Issues

Connection failures:

# Check PBS service status
systemctl status proxmox-backup

# Check firewall
iptables -L -n | grep 8007

# Test connection from PVE
curl -k https://YOUR-PBS-IP:8007

Low disk space:

# Check datastore usage
df -h /mnt/datastore

# Run garbage collection manually
proxmox-backup-manager garbage-collect backup-store

# Check GC logs
journalctl -u proxmox-backup-gc@backup-store

Slow backups:

# Check network throughput
iperf3 -s  # On PBS
iperf3 -c YOUR-PBS-IP  # On PVE

# Check disk I/O
iostat -x 1

# Monitor PBS resources
top

Failed verification:

# Check verification logs
journalctl -u proxmox-backup-verify

# Manually verify backup
proxmox-backup-client verify     --repository backup-store     vm/100/2025-12-17T02:00:00Z

Debug Mode

Enable debug logging:

# Edit /etc/proxmox-backup/backup.cfg
# Add:
[admin]
  debug = true

# Restart service
systemctl restart proxmox-backup

# View logs
journalctl -u proxmox-backup -f

Part 18: Best Practices

Backup Strategy

  1. 3-2-1 Rule: 3 copies, 2 different media, 1 offsite
  2. Regular testing: Test restores monthly
  3. Multiple datastores: Separate critical vs non-critical
  4. Offsite replication: Sync to remote PBS
  5. Document procedures: Keep recovery runbook

Security

  1. Enable encryption: Always encrypt backups
  2. Secure keys: Store encryption keys offline
  3. Access control: Minimal permissions per user
  4. Network security: Firewall PBS, use VPN
  5. Regular updates: Keep PBS and PVE updated

Monitoring

  1. Daily checks: Review backup completion
  2. Alerts: Configure email/monitoring for failures
  3. Space monitoring: Alert at 80% datastore usage
  4. Verification: Weekly backup verification
  5. Performance: Monitor backup duration trends

Maintenance

Schedule regular maintenance:

# Weekly tasks
- Review failed backups
- Check verification status
- Monitor disk usage

# Monthly tasks
- Test restore procedures
- Review retention policies
- Update documentation

# Quarterly tasks
- Rotate offsite backups
- Security audit
- Performance review

Conclusion

You now have a complete Proxmox Backup Server setup providing enterprise-grade backup for your Proxmox environment. This solution offers:

  • Efficient deduplicated backups
  • Strong encryption
  • Automated scheduling
  • Easy restore procedures
  • Offsite replication
  • Comprehensive monitoring

Next Steps

  1. Test restore procedures: Practice VM recovery
  2. Configure offsite sync: Set up remote PBS replication
  3. Enable encryption: Protect your backup data
  4. Monitor backups: Set up alerts and dashboards
  5. Document your setup: Create recovery procedures

Additional Resources

Remember: Untested backups are not backups. Regularly test your restore procedures to ensure your data is truly protected!