Proxmox Backup Server Installation

This guide covers the complete installation and setup of Proxmox Backup Server (PBS) from scratch. PBS provides enterprise-grade backup capabilities for Proxmox VE environments with deduplication, compression, and encryption.

Architecture Overview

Prerequisites


Part 1: Installation

Step 1: Prepare the Server

  1. If the server has a RAID controller, configure the OS SSD as a single-disk RAID 0 (or JBOD/passthrough)
  2. Configure backup storage disks:
    • Single disk: JBOD or single-disk RAID 0
    • Multiple HDDs: Hardware RAID 5/6/10 depending on your needs (RAID 6 recommended for large arrays)
    • Note: If using ZFS for backup storage, pass disks through as JBOD (no hardware RAID)
  3. Mount the PBS ISO via IPMI virtual media or USB

Step 2: Boot and Install PBS

  1. Boot from the PBS ISO
  2. Select "Install Proxmox Backup Server (Graphical)"
  3. Accept the EULA
  4. Select the OS SSD as the installation target:
    • Click Options
    • Filesystem: ext4 (recommended for single SSD) or ZFS (RAID0) for single disk with ZFS features
    • hdsize: Use full SSD capacity
    • swapsize: 4-8 GB
    • maxroot: Use remaining space
  5. Important: Do NOT select the backup storage disk(s) here - only select the OS SSD

Step 3: Network and Password Configuration

  1. Country/Timezone: Set appropriately
  2. Password: Set a strong root password
  3. Email: Enter admin notification email
  4. Management Interface: Select the primary NIC
  5. Hostname: Set FQDN (e.g., pbs1.4goodhosting.com)
  6. IP Address: Set static IP (should be on the same network or routable to your PVE nodes)
  7. Netmask: e.g., 255.255.255.0
  8. Gateway: Set default gateway
  9. DNS Server: Set DNS server

Step 4: Complete Installation

  1. Review the summary - confirm the target disk is the SSD, not the backup storage
  2. Click Install
  3. Wait for installation to complete
  4. Remove the ISO/USB media
  5. Reboot the server

Part 2: Post-Installation Configuration

Step 5: Access the Web Interface

Open a browser and go to: https://<pbs-ip>:8007

Login with user root@pam and the password you set during installation.

Step 6: Update Repositories and Packages

# SSH into the PBS server
ssh root@<pbs-ip>

# Disable enterprise repo (if no subscription)
sed -i 's/^deb/# deb/' /etc/apt/sources.list.d/pbs-enterprise.list

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

# Update system
apt update && apt full-upgrade -y

Step 7: Configure Backup Storage Disk

7.1 Identify the Backup Disk

# List all disks
lsblk

# Example output:
# NAME   SIZE  TYPE  MOUNTPOINT
# sda    120G  disk             <-- OS SSD (has partitions)
# ├─sda1   1G  part  /boot/efi
# ├─sda2  112G part  /
# └─sda3   4G  part  [SWAP]
# sdb      2T  disk             <-- Backup storage (or /dev/sdb for RAID VD)

# Confirm the disk
fdisk -l /dev/sdb

7.2 Option A: Format as ext4 (Simple, Recommended)

# Create a single partition
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary ext4 0% 100%

# Format the partition
mkfs.ext4 -L backups /dev/sdb1

# Create mount point
mkdir -p /mnt/backups

# Add to fstab for persistent mount
echo "LABEL=backups /mnt/backups ext4 defaults 0 2" >> /etc/fstab

# Mount it
mount -a

# Verify
df -h /mnt/backups

7.2 Option B: Format as XFS (Good for large files)

# Create partition
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary xfs 0% 100%

# Format
mkfs.xfs -L backups /dev/sdb1

# Mount
mkdir -p /mnt/backups
echo "LABEL=backups /mnt/backups xfs defaults 0 2" >> /etc/fstab
mount -a

7.2 Option C: ZFS Pool (Deduplication + checksums, needs more RAM)

# If using multiple raw disks (JBOD mode), create a ZFS pool
# Example with 4 disks in RAID-Z1 (similar to RAID 5):
zpool create -f -o ashift=12 backuppool raidz1 /dev/sdb /dev/sdc /dev/sdd /dev/sde

# Or for a single disk/RAID virtual disk:
zpool create -f -o ashift=12 backuppool /dev/sdb

# Optimize for backup workloads
zfs set compression=zstd backuppool
zfs set atime=off backuppool
zfs set recordsize=1M backuppool

# Create dataset for PBS
zfs create backuppool/pbs-data

# The mount point will be /backuppool/pbs-data

Step 8: Create a Datastore in PBS

A datastore is where PBS stores backup data. Configure it via the web UI or CLI.

Via Web UI:

  1. Go to Administration > Storage / Disks to verify your backup disk is visible
  2. Go to Datastore > Add Datastore
  3. Name: main-backups (or any descriptive name)
  4. Backing Path: /mnt/backups (or /backuppool/pbs-data if using ZFS)
  5. Click Add

Via CLI:

# Create the datastore directory structure
proxmox-backup-manager datastore create main-backups /mnt/backups

# Verify
proxmox-backup-manager datastore list

Step 9: Configure Datastore Retention Policy

Set how long backups are kept. This is crucial for managing storage space.

Via Web UI:

  1. Go to Datastore: main-backups > Prune & GC
  2. Click Edit under Prune Options
  3. Set retention (recommended starting point):
    • Keep Last: 3 (keep the 3 most recent backups)
    • Keep Daily: 7 (one backup per day for the last 7 days)
    • Keep Weekly: 4 (one backup per week for the last 4 weeks)
    • Keep Monthly: 6 (one backup per month for the last 6 months)
    • Keep Yearly: 1 (one backup per year)
  4. Click OK

Via CLI:

proxmox-backup-manager datastore update main-backups \
  --keep-last 3 \
  --keep-daily 7 \
  --keep-weekly 4 \
  --keep-monthly 6 \
  --keep-yearly 1

Step 10: Set Up Garbage Collection Schedule

Garbage collection removes unreferenced data chunks to reclaim disk space.

  1. Go to Datastore: main-backups > Prune & GC
  2. Under Garbage Collection, click Edit
  3. Set a schedule: daily 03:00 (run GC at 3 AM daily)
  4. Click OK

Step 11: Configure Verification Jobs

Verification ensures backup integrity by checking all data chunks.

  1. Go to Datastore: main-backups > Verify Jobs
  2. Click Add
  3. Schedule: weekly (or sat 02:00 for Saturday at 2 AM)
  4. Skip Verified: Check this to only verify new/changed data
  5. Click Add

Part 3: Connect PBS to Proxmox VE

Step 12: Get the PBS Fingerprint

# On the PBS server, get the API certificate fingerprint
proxmox-backup-manager cert info | grep Fingerprint

# Output example:
# Fingerprint (sha256): ab:cd:ef:12:34:56:78:90:...

Step 13: Create a Backup User and API Token (Recommended)

Instead of using root, create a dedicated backup user:

Via Web UI on PBS:

  1. Go to Configuration > Access Control > User Management > Add
  2. User name: backup
  3. Realm: pbs (Proxmox Backup authentication server)
  4. Password: Set a strong password
  5. Click Add

Set permissions for the user:

  1. Go to Configuration > Access Control > Permissions > Add
  2. Path: /datastore/main-backups
  3. User: backup@pbs
  4. Role: DatastoreBackup (or DatastoreAdmin for full control)
  5. Click Add

Via CLI:

# Create user
proxmox-backup-manager user create backup@pbs --password "YourStrongPassword"

# Grant permissions
proxmox-backup-manager acl update /datastore/main-backups DatastoreBackup --auth-id backup@pbs

Step 14: Add PBS as Storage on Proxmox VE

Via PVE Web UI:

  1. Log into your Proxmox VE web UI
  2. Go to Datacenter > Storage > Add > Proxmox Backup Server
  3. Fill in:
    • ID: pbs-main
    • Server: PBS IP address (e.g., 192.168.1.50)
    • Username: backup@pbs
    • Password: The password you set for the backup user
    • Datastore: main-backups
    • Fingerprint: Paste the fingerprint from Step 12
  4. Click Add

Via CLI on PVE node:

pvesm add pbs pbs-main \
  --server <pbs-ip> \
  --username backup@pbs \
  --password <password> \
  --datastore main-backups \
  --fingerprint <fingerprint>

Part 4: Configure Backup Jobs

Step 15: Create Backup Jobs on PVE

Via PVE Web UI:

  1. Go to Datacenter > Backup > Add
  2. Configure the backup job:
    • Storage: pbs-main
    • Schedule: 01:00 (daily at 1 AM) or set a custom schedule
    • Selection mode: All or select specific VMs/containers
    • Compression: ZSTD (recommended - best compression ratio)
    • Mode: Snapshot (recommended, no downtime)
    • Send email to: Your admin email
    • Email notification: Always or On failure
  3. Click Create

Step 16: Test a Manual Backup

  1. Select a VM or container in the PVE web UI
  2. Go to Backup > Backup Now
  3. Select pbs-main as storage
  4. Set compression to ZSTD
  5. Click Backup
  6. Monitor the task log to confirm success

Step 17: Verify Backup on PBS

  1. Go to the PBS web UI
  2. Navigate to Datastore: main-backups > Content
  3. You should see the backup snapshot listed
  4. Check the size and verify the deduplication ratio in Dashboard

Part 5: Additional Configuration

Enable Encryption (Optional but Recommended)

Client-side encryption ensures backup data is encrypted before leaving the PVE node:

# On the PVE node, generate an encryption key
proxmox-backup-client key create /etc/pve/priv/pbs-encryption-key.json

# IMPORTANT: Back up this key file securely!
# Without it, you cannot restore encrypted backups

# Update the PBS storage configuration to use encryption
pvesm set pbs-main --encryption-key /etc/pve/priv/pbs-encryption-key.json

Set Up Email Notifications on PBS

# Configure postfix for email relay (same as PVE setup)
apt install -y libsasl2-modules

cat >> /etc/postfix/main.cf <<EOF
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
EOF

echo "[smtp.gmail.com]:587 user@gmail.com:app-password" > /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
systemctl restart postfix

PBS Dashboard Monitoring

The PBS web UI provides useful monitoring:

Storage Space Monitoring

# Check backup storage usage
df -h /mnt/backups

# Check datastore status via CLI
proxmox-backup-manager datastore list

# Check garbage collection status
proxmox-backup-manager garbage-collection status main-backups

# Run manual garbage collection
proxmox-backup-client garbage-collect main-backups

Restore a Backup (Testing)

Always test your restore process:

  1. On PVE, go to Storage > pbs-main > Backups
  2. Select a backup and click Restore
  3. Choose a target storage and VM ID
  4. Click Restore and verify the VM boots correctly
  5. Delete the test-restored VM after verification

Troubleshooting

Common Issues

PBS Web UI Not Accessible

# Check if the proxy service is running
systemctl status proxmox-backup-proxy

# Restart if needed
systemctl restart proxmox-backup-proxy

# Check if port 8007 is open
ss -tlnp | grep 8007

Backup Fails with Connection Error

# Test connectivity from PVE to PBS
ping <pbs-ip>
curl -k https://<pbs-ip>:8007/api2/json/version

# Check firewall rules on PBS
iptables -L -n | grep 8007

# Ensure port 8007 is open
ufw allow 8007/tcp   # if using ufw

Datastore Shows as Unavailable

# Check if the backup disk is mounted
mount | grep backups

# If not mounted, check fstab and mount manually
mount -a

# Check disk health
smartctl -a /dev/sdb

High Storage Usage

# Run manual prune job
proxmox-backup-manager prune main-backups --keep-last 3 --keep-daily 7

# Run garbage collection after pruning
proxmox-backup-manager garbage-collection start main-backups

# Monitor GC progress
proxmox-backup-manager task list --typefilter garbage_collection