Setup Proxmox Backup Server (PBS)
Abstract
Proxmox Backup Server (PBS) is a dedicated backup solution designed for Proxmox Virtual Environment (PVE). This guide will walk you through setting up PBS in a VM on PVE and connecting it to your PVE cluster for efficient backup management.
Prerequisites
- Proxmox VE cluster installed and setup
For installation instructions, refer to the official PBS documentation.
Step 1: Download PBS ISO
Download the Proxmox Backup Server ISO Installer and upload it to your Proxmox server.
Step 2: Create the VM on Proxmox VE
- In Proxmox create a new VM
- Select the Proxmox Backup Server ISO
- Select Qemu Agent. It is used to exchange information between the host and guest, and to execute command in the guest.
- Create a disk for PBS to be installed on. The PBS hardware requirements state that a minimum of 32Gb is recommended
- Create a disk that will be used for the storage of your backups. This is highly dependant on the amount of VM/LXC backups and retention. I chose 2Tb.
- Choose the amount of cores. The PBS hardware requirements state that a minimum of 4 cores is recommended.
- Choose the amount of RAM. The PBS hardware requirements state that a minimum of 4Gb is recommended. And add at least another GB per TB storage space. As I have 2Tb of storage, I chose a total of 6Gb of RAM.
- Choose a network configuration. I left everything default.
- Check your configuration and the start the VM.
Step 3: Installation
- Install PBS with a graphical user interface.
- Accept the EULA.
- Select the 32Gb disk that we created earlier.
- Fill in your country, timezone and keyboard layout.
- Choose a unique password and fill in your email address.
- Fill in your network details.
- ID: A name for the connection, e.g.,
pbs-backup
. - Managment Interface: unless you want/have a different interface, leave this as default
- Hostname: "NameOfYourPBS":local
- IP Address: Choose a static IP address
- Gateway: Fill in the gateway
- DNS server: Fill in a DNS server
- ID: A name for the connection, e.g.,
- Finish the installation by clicking continue
Access the PBS Dashboard
- Open your PBS web interface using its IP address, e.g.,
https://192.168.1.101:8007
. - Log in using your administrator credentials.
Step 4: Configure updates for PBS
By default, PBS (and Proxmox VE), are configured to download the 'Enterprise' repository for your updates. If you do not have an enterprise license, we need to add the 'no-subscription' repository and disable the enterprise repository.
-
Go to Administration, Repositories and click Add:
-
Select the 'no-subscription' repository and click Add:
-
Select the 'pbs-enterprise' repository and click 'disable':
-
Go to 'administration', 'Updates', and click 'refresh'. This will will check the repository for updates. Afterwards click on 'update'.
Step 5: Create a datastore
Now we need to create a location where to store our backups which is called a datastore.
- Under 'Storage/Disks' > Disks, you will see the 2Tb disk that we created during the VM setup.
-
To add it as a datastore, go to Directory and select 'Create: Directory'
-
Select the disk, your filesystem of preference (I chose ext4), give you datastore a new and make sure 'Add as Datastore' is selected:
Step 6: Create a backup user (optional but recommended)
It is optional but recommended to create a separate backup user. In the next step we will connect our PBS to Proxmox VE, and for that you need a user. You could simply use the root user, but best practices dictate that a separate user is better for security reasons.
-
To create the user, go to Access Controll and click 'Add'. Fill in the details
-
Now that the account has been created, we also need to give it the correct permissions. Go the Permissions tab:
-
We need to give that user access to the datastore we created, and give it the role DatastoreAdmin
Step 6: Security
Add Two Factor Authentication to secure your root account. Note: a user that has Two Factor Authentication, can't be used to connect your PBS to Proxmox VE. That is also why we created a separate backup user in the previous step.
- Go to Access Control > Two Factor Authentication > Add > TOTP
Fill the required details using your preferred password manager.
Step 7: Add a namespace (optional)
It is optional to create a namespace. Storing your backups in separate namespaces is very useful if you ever plan on planning to use your PBS to store backups from multiple Proxmox hosts, or even other Linux server.
- Go to your datastore > Content > Add Namespace
I gave my namespace the name 'falador_snapshots_local', as my Proxmox cluster is called Falador.
The 'local' part is simply because I will also add a remote Proxmox cluster later.
Step 8: Qemu agent
The qemu-guest-agent is a helper daemon, which is installed in the guest. It is used to exchange information between the host and guest, and to execute command in the guest.
- Go to 'Shell'
- Use the command:
Step 9: Connect PBS to Proxmox VE
Note the Fingerprint Information
- Navigate to the Dashboard.
- Copy the Fingerprint. You will use this to authenticate the connection with your PVE cluster.
Example:
Add PBS Connection in Proxmox VE
- Log in to the PVE web interface.
- Navigate to Datacenter > Storage > Add > Proxmox Backup Server.
- Fill in the following details:
- ID: A name for the connection, e.g.,
pbs-backup
. - Server: The PBS server's IP address (e.g.,
192.168.0.20
). - Username:
youruser@pam
. - Password: The password for your PBS account.
- Fingerprint: Paste the fingerprint copied from the PBS dashboard.
- Namespace: Leave this blank unless specific namespaces are configured on your PBS instance.
- ID: A name for the connection, e.g.,
- In the tab 'Encryption', you can encrypt your backups using an encryption key. Keep this safe!
- Click Add to save the configuration.
Verify the Connection
- In the PVE interface, go to Datacenter > Storage.
- Confirm that the newly added PBS server is listed.
- Click on the PBS storage to verify connectivity.
Step 10: Configure a Backup Schedule
- In the PVE web interface, navigate to Datacenter > Backup.
- Click Add to create a new backup job.
- Configure the backup settings:
- Storage: Select the PBS storage you added earlier.
- Nodes: Choose the PVE nodes to back up.
- VMs: Select specific VMs or include all VMs. I have opted to exclude certain VMs.
- Schedule: Set a recurring schedule for the backup job (e.g., daily at 2:00 AM).
- Retention: You could define your retention here, but it is recommended to manage these from PBS (see later).
- Save the backup job.
Step 11: Test Backups
- Manually trigger the backup job by clicking Run Now.
- Monitor the backup progress in the Task Log.
- Verify the backup in the PBS interface under Content > Backups.
Step 12: Create schedueles
Prune jobs
Here we define how long we which to keep each snapshot.
- You can do this by going in PBS to Datastore > Prune & GC Jobs
- I have opted to keep 5 daily, 1 weekly and 1 monthly snapshot. You can always change this.
PBS will check for this daily at 07:00.
Garbage collect jobs
Whenever snapshots are pruned by our job above, the data is actually not removed. It's just marked to be removed. That is why we need to setup a garbage collection job, to remove the unwanted snapshots.
- I will let mine run every day at 12:00
Verify jobs
Check backup integrity by ensuring stored data is valid and not corrupted. I'll will let run every day at 13:00
Conclusion
You have successfully set up Proxmox Backup Server and integrated it with your PVE cluster. With automated schedules and retention policies, your virtual machines are now protected against data loss. For further details, consult the Proxmox Backup Server documentation.