Proxmox Backup Server (PBS)
What is Proxmox Backup Server?
Proxmox Backup Server is an enterprise backup solution, for backing up and restoring VMs, containers, and physical hosts.
Deployment
PBS is deployed as a virtual machine on the Proxmox VE cluster on Node 1 (Primary). The PBS deployment is via an ISO image.
-
Download the ISO to the Node 1 (Primary) storage.
-
Navigate to
proxmox01
>Create VM
. -
Provide the following details for
General
and click Next:Setting Value Name backup01
Node proxmox01
Start at boot ✅ -
Under
OS
, select the storage where the ISO was downloaded to and choose the Proxmox Backup Server ISO image. Click Next. -
Under
System
, select theVirtIO SCSI Single
controller and click Next. -
Provide the following details for
Disks
and click Next:Setting Value Bus/Device SCSI
Storage lv-ssd-crucial
Size 32GiB
Format Raw disk image (raw)
Discard ✅ SSD Emulation ✅ Setting Value Bus/Device SCSI
Storage lv-ssd-crucial
Size 150GiB
Format Raw disk image (raw)
Discard ✅ SSD Emulation ✅ -
Provide the following details for
CPU
and click Next:Setting Value Cores 4
Type host
-
Provide the following details for
Memory
and click Next:Setting Value Memory (MiB) 5120
Ballooning Device ✅ Minimum Memory 1024
-
Leave
Network
as default, click Next and confirm deployment. -
Start the
backup01
VM and open the console to begin the installation. -
Follow the on-screen instructions to install PBS, when prompted enter the following details:
Setting Value FQDN backup01.net.dbren.uk
Email Enter email Password Enter password Default Gateway 192.168.0.1
IP Address 192.168.0.6/24
-
Once installation has completed, login to the web interface listening on port
8007
using the FQDN and credentials entered during installation.
Post Installation
Below are the post installation steps for configuring the PBS.
Copy SSH public key to the PBS's authorized_keys
file:
ssh-copy-id [email protected]
Datastore Creation
The PBS requires a datastore to store backups. In my setup, I have two datastores, one which is a Hetzner Storagebox mounted via CIFS on the PBS at /mnt/storagebox
, and the other which is a local disk.
Documentation
Hetzner Storagebox Datastore
-
Use the
playbook-proxmox-backup-cifs.yml
to mount the CIFS share on the PBS. -
SSH to the PBS and create the datastore:
Local Datastore
-
SSH to the PBS and initialise the disk with a GPT:
-
Create the datastore:
-
Configure the datastore:
Verify Job Creation
The verify job is used to verify the integrity of the backups. SSH to the PBS and use the following command to create the verify job:
proxmox-backup-manager verify-job create verify-backup02 --store backup02 --schedule "03:00" --ignore-verified=true --outdated-after=30
Sync Job Creation
Local & Offsite Copy
This makes sure that I have a local copy of backups and an offsite copy on the Hetzner Storagebox.
Configure the backups to sync from the backup02
datastore to backup01
datastore:
proxmox-backup-manager sync-job create sync-pull-backup02-backup01 --owner 'root@pam' --store backup01 --remote-store backup02 --schedule "02:00" --remove-vanished=true
HTTPS - Web Interface with Let's Encrypt
Cloudflare API Token & Zone ID
See the following instructions for generating a Cloudflare API Token.
Furthermore, you will need to obtain your domain's zone ID. This can be found in the Cloudflare dashboard page for the domain, on the right side under API > Zone ID.
-
Login to the PBS GUI and go to
Configuration
>Certificates
>ACME Accounts
> Accounts and click Add:Setting Value Account Name default
Email <Email>
ACME Directory Let's Encrypt V2
Accept TOS True
-
Click Register.
-
Under Challenge Plugins, click Add and enter the following details:
Setting Value Plugin ID cloudflare
DNS API Cloudflare Managed API
CF_Token <Cloudflare API Token>
CF_Zone_ID <Cloudflare Zone ID>
-
Click Add.
-
Navigate to
Certificates
and under ACME click Add:Setting Value Challenge Type DNS
Plugin cloudflare
Domain backup01.net.dbren.uk
-
Click Create.
-
Under ACME > for
Using Account
click Edit and select thedefault
account and click Apply. -
Click Order Certificates Now.
Once completed, the PBS web interface will reload and show the new certificate.
Scripts
Warning
Proceed with caution, before running any of the scripts below, make sure to review the code to ensure it is safe to run.
-
Run the PBS post install script on PBS:
Quote
The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS.
Backup Operations
Backup operations are performed using the proxmox-backup-client
command on the Proxmox VE nodes. Below are some common operations.