Sign In
Sign In

Proxmox Backup Server (PBS): Integration with Proxmox VE and Basic Operations

Proxmox Backup Server (PBS): Integration with Proxmox VE and Basic Operations
Hostman Team
Technical writer
Servers
21.11.2024
Reading time: 9 min

Proxmox Backup Server is a Debian-based solution that makes backup simple. With it, you can back up virtual machines, containers, and the contents of physical hosts. PBS is installed on bare metal. All the necessary tools are bundled in a single distribution.

Proxmox Backup Server is optimized for the Proxmox Virtual Environment platform. With this combination, you can:

  • Safely back up and replicate data.
  • Manage backups through both a graphical interface and command line.

Proxmox Backup Server is free software.

Key Features

Data loss or corruption due to deletion, ransomware, or other dangers can occur at any time. Therefore, regular backups of critical data are essential.

To improve performance and achieve objectives, create backups of data using Proxmox Debian. These backups will take up minimal space, allow for instant recovery, and efficiently reduce working time through simplified management.

User Role and Group Permissions

Proxmox Backup protects data from unauthorized access. A range of access control options ensures that users are limited to only the level of access they need. For example, marketers don’t need access to accounting reports, and accountants don’t need to see backups of the main product code.

For convenience, you can use several authentication domains: OpenID Connect, Linux PAM, or a separate authentication server. The administrator precisely defines what each user is allowed to do and what is prohibited.

Easy Management

PBS comes with a graphical interface through which the administrator manages the server. For advanced users who are familiar with the Unix shell, Proxmox provides a command-line interface for performing specialized or highly complex tasks.

Additionally, Proxmox Backup Server uses a RESTful API. The main data format is JSON. The entire API is formally defined using its schema. This ensures fast and easy integration with third-party management tools.

Reliable Encryption

It’s not just important to have access to backups, but also to be confident that the information has not been compromised. To provide that confidence, PBS securely encrypts Linux backups. This guarantees security even on less-trusted hosts — for example, on rented servers. No one except the owner can decrypt and read the stored information.

Granular Recovery

Why restore all data when you can restore only what’s needed? To reduce overhead, Proxmox Backup Server comes with a snapshot catalog for navigation. You can quickly explore the contents of an archive and instantly recover individual objects.

System Requirements

  • CPU: A 64-bit processor based on AMD or Intel with at least 4 cores.
  • Memory: At least 4 GB for the system, file system cache, and daemons. It is recommended to add at least 1 GB of memory for each terabyte of disk space.
  • Storage: Requires at least 32 GB of free space. The documentation suggests using hardware RAID. It is recommended to use solid-state drives (SSDs) for backup storage.

Server Installation

To store backups, you need a server. You will install Proxmox Backup Server on it. You can manage this setup through either a graphical interface or the command line, depending on what suits you best.

The easiest way to install the backup system on the server is by using a disk image (ISO file). This distribution includes all the necessary components for full functionality:

  • Installation wizard
  • Operating system with all dependencies
  • Proxmox Linux kernel with ZFS support
  • Tools to manage backups and other resources
  • Management interface

Installation from the disk is very simple. If you have ever installed an operating system, you will have no trouble. The installation wizard will help partition the disk and configure basic settings like time zone, language, and network for internet access. During the installation process, you will add all the necessary packages that convert a regular Debian system into one for managing backups.

PBS uses the entire server. During installation, all other data will be deleted. You will create a server dedicated to one task — managing backups.

Setting up a separate server also involves a security consideration. In this case, you will have access to backups even if other parts of the distributed system stop working.

Installation on Debian

Suppose you already have a server with Debian installed. In this case, installing Proxmox can be done through a different scenario. There’s no need to reinstall the OS—just add the missing packages. They will integrate seamlessly on top of the standard setup.

To perform the Proxmox download, enter the following commands in the Debian command line:

apt-get update
apt-get install proxmox-backup-server

This will install the packages in a minimal configuration. If you want to get the same set as when using the installer, run:

apt-get update
apt-get install proxmox-backup

This will install the packages in the full configuration, including the ZFS-supporting kernel and a set of useful tools. Essentially, this is the same as using the disk image.

After installation, you can immediately connect to the Proxmox Web Interface through a browser, using HTTPS on Proxmox port 8007. For example, at https://<ip-or-dns-name>:8007.

You can also separately install the Proxmox Backup Client. To do so, you need to configure the client repository based on APT and run these commands:

apt-get update
apt-get install proxmox-backup-client

These are the standard installation recommendations. If you need to set up a custom configuration, such as with Proxmox DHCP, refer to the documentation for further guidance.

Adding a Server to Proxmox VE

Before backing up the server, you need to perform a preliminary configuration.

Create a User

In Proxmox, configuration is done through an easy-to-use interface. Let’s create the first user:

  1. Open the Configuration tab — Access Control.
  2. Click Add.
  3. Add a new user.

For example, you can add a user user1@pbs. The "pbs" part is mandatory; if it’s omitted, an error message about incorrect credentials will appear.

Create a Storage

The next step is to create repositories. These allow you to distribute data according to your criteria. For example, you can create incremental backups for PostgreSQL, store data saved by Proxmox Ubuntu separately, and more. To do this, use the Proxmox Add Disk procedure.

  1. Go to Administration — Storage / Disks.
  2. Select a disk and initialize it by clicking Initialize Disk with GPT.
  3. Go to Directory — Create: Directory and create a directory for storing data.
  4. Specify the name of the data storage and the absolute path to the directory. If you check Add as Datastore, the new data storage will be immediately connected as a datastore object.

Proxmox Storage configuration is now complete, and you just need to assign access rights to the repository. To do this:

  1. Click on the name of the created data storage, go to Permissions, and click Add — User Permission.
  2. Select the desired user and their role, then click Add to confirm.

At this point, the preliminary setup is complete.

Save the Fingerprint

By default, PBS uses a self-signed SSL certificate. You must save the fingerprint to establish trusted connections between the client and the server in the future. Without it, you won’t be able to connect — this is one of the security mechanisms.

Go to Administration — Shell and capture the server's "fingerprint" with the command:

proxmox-backup-manager cert info | grep Fingerprint

This will return a string containing the unique fingerprint. You can later use it to establish a connection with the backup server.

Add a Server

You can add storage directly from the Proxmox VE web interface (Datacenter — Storage — Add) or manually via the console. Let’s explore the second option, as it provides more flexibility in configuration.

You need to define the new storage with the pbs type on your Proxmox VE node. In the following example, store2 is used as the storage name, and the server address is localhost. You are connecting as user1@pbs.

  1. Add the storage:

pvesm add pbs store2 --server localhost --datastore store2
  1. Set the username and password for access:

pvesm set store2 --username user1@pbs --password <secret>

If you don’t want to enter the password as plain text, you can pass the --password parameter without any arguments. This will prompt the program to ask for the password when you enter the command.

If your backup server uses a self-signed certificate, you need to add the certificate's fingerprint to the configuration. You already obtained the fingerprint earlier with the following command:

proxmox-backup-manager cert info | grep Fingerprint

To establish a trusted relationship with the Backup Server Linux, add the fingerprint to the configuration:

pvesm set store2 --fingerprint 64:d3:ff:3a:50:38:53:5a:9b:f7:50:...:ab:fe

After --fingerprint, paste the fingerprint you obtained.

  1. Check the status of the storage with:

pvesm status --storage store2

Through the web interface, you will see the storage listed among the virtual machines and container backups available for data storage, along with usage statistics. It’s now time to create your first backup.

Backup and Recovery

Suppose you have an LXC container running Ubuntu inside. To back it up:

  1. Open the Backup section.
  2. Select the desired Storage.
  3. Click Backup now.
  4. Choose the type of backup.

If you access the PBS server, you can view the information about the completed backup task.

To verify the backup’s functionality, delete the Ubuntu container and then perform a recovery.

  1. In the PVE web interface, go to Storage.
  2. Open the Content tab.
  3. Select the backup file.
  4. For recovery, choose the location and a new identifier (by default, it will be the same as when we created the backup), and set the read data limit. This will help avoid overloading the virtualization server’s input channel. Click Restore and start the container.

Thanks to the fast backup creation and recovery process in Proxmox, you can also easily migrate a virtual machine.

Backing up a virtual machine is no different from backing up a container. The recovery process is the same. You specify the desired backup and the location for deployment and decide whether to start the machine immediately after the procedure is completed.

If you need not the entire backup but only individual files, you can recover them through the PBS web interface.

Conclusion

By setting up backups with Proxmox, you can be confident that virtual machines or containers won’t be lost in case of a storage failure. You can easily restore them with minimal effort. All that is required is to mount a new host, add the data storage, and start the recovery process.

Servers
21.11.2024
Reading time: 9 min

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support