How to Install and Configure the Proxmox Backup Server (PBS) Client on Debian

Why Use the Proxmox Backup Client?

Proxmox Backup Server (PBS) is renowned for seamlessly backing up entire Proxmox VE virtual machines using high-speed deduplication. However, many administrators do not realize that you can use the standalone Proxmox Backup Client to backup any physical or virtual Linux machine directly to your PBS server, even if that machine is not hosted on a Proxmox hypervisor. This allows you to leverage PBS’s incredible incremental backup speeds and ransomware-resistant datastores for bare-metal Debian servers.

Step 1: Add the Proxmox Repository

The client is not included in the default Debian repositories; you must add the official Proxmox APT repository.

Open your terminal on the Debian server you wish to back up, and download the Proxmox release key:

wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg

Next, add the client repository to your sources list (adjusting “bookworm” to match your Debian version if necessary):

echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" | sudo tee /etc/apt/sources.list.d/pbs-client.list

Step 2: Install the Client Package

Update your local package index so it reads the new Proxmox repository, then install the standalone client package:

sudo apt update

sudo apt install proxmox-backup-client -y

Step 3: Define the PBS Environment Variables

To avoid typing your server IP, datastore name, and username every time you run a backup command, you should set them as environment variables. You can export these temporarily in the terminal, or add them to your ~/.bashrc for permanent use.

export PBS_REPOSITORY="admin@[email protected]:MainDatastore"

export PBS_PASSWORD="YourSecurePBSPassword"

Note: The repository format is User@Realm@ServerIP:DatastoreName.

Step 4: Execute a Manual Backup

With the environment variables set, running a backup is incredibly simple. You must define the name of the backup archive and point it to the local directory you want to secure.

To back up the entire /etc directory and call the archive “config-backup.pxar”, run:

proxmox-backup-client backup config-backup.pxar:/etc

The client will chunk the files, hash them, compress them using Zstandard, and push only the unique blocks to the PBS server.

Step 5: Automate Backups via Cron

Manual backups are easily forgotten. To secure your bare-metal server automatically, create a simple bash script (e.g., /opt/backup.sh):


#!/bin/bash
export PBS_REPOSITORY="admin@[email protected]:MainDatastore"
export PBS_PASSWORD="YourSecurePBSPassword"
proxmox-backup-client backup root-archive.pxar:/

Make the script executable (chmod +x /opt/backup.sh). Open your crontab (crontab -e) and schedule the script to run every night at 2:00 AM:

0 2 * * * /opt/backup.sh > /var/log/pbs-backup.log 2>&1

Your standalone Debian machine is now fully integrated into your enterprise Proxmox Backup ecosystem.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.