Looking back at the process of installing PBS, I recorded as much as I could in hopes it will be helpful.
Download the `proxmox-backup-server_1.0-1.iso` file from the official website and place it in the ISO directory of my Proxmox VE. Create a virtual machine and use the PBS image file as the boot disk (of course, you can also clone it to a USB drive or DVD for installation on a physical server).
Pre-installation Planning
When considering backups, it’s essential to account for the following factors:
Capacity: Assess the total capacity of the virtual machines or containers that need to be backed up and reserve enough extra space. For example, if your virtual machines take up 10TB, it is recommended to allocate 20-30TB for backup.
Performance: The bottlenecks affecting backup write performance include network bandwidth, disk I/O, and memory size. To achieve greater capacity at a lower cost, cheap low-RPM SATA drives are often used. If you need to back up a large number of virtual machines simultaneously, you should consider using SSDs for front-end caching to improve performance. Currently, memory prices are relatively low, so equipping the backup server with 64GB of RAM isn’t too costly. For networking, it’s recommended to use gigabit or faster.
Availability: Separate the system from the backup storage space. It is recommended to use SSDs or high-speed SAS drives for the system disk, with two drives configured in RAID. For the backup data disk, RAID 5 or higher is recommended.
Proxmox VE Backup Components
A complete Proxmox VE backup consists of both the backup server and client. Proxmox VE 6.2 and later automatically install the client. Note that the client is installed on Proxmox VE (the physical machine’s Debian system), not the virtual machines or containers inside Proxmox VE. PBS can be either a physical machine or a virtual machine, but for production environments, it’s strongly recommended to use a highly available physical server.
Installing the PBS Client
Log into the Proxmox VE system and run `apt-get install proxmox-backup-client` to install the client. If the PBS client is already installed, you can skip this step. In the PVE web management interface, you will find an option related to PBS under the “Add Storage” dropdown menu called “Proxmox Backup Server.”
PBS System Installation
Boot the system and enter the installation interface. The cursor will be positioned on the first option, so just press Enter.
You can read the license agreement, then click the “Agree” button with the mouse.
Choose the installation location for PBS. From the previous planning, we know there are at least two storage areas, one small area for the system installation, and another for backing up PVE virtual machines or containers. Verify that PBS is being installed on the smaller disk space.
For the system time zone, you can manually input it, and it will auto-complete other fields.
Set a system password, and develop a habit of security awareness by using a complex password. For the email address, the default value cannot be validated; just change the domain suffix to something like “com” or “net” to proceed.
In the network settings, the hostname must also be changed. Enter the IP address according to your resource planning, making sure it doesn’t conflict with other systems in the network.
On the summary screen, review everything and click the “Install” button to proceed.
Compared to Proxmox VE, PBS requires much less space, so the installation is much faster and completes within a few minutes, followed by an automatic reboot.
PBS Configuration
PBS configuration can be divided into the following steps: logging into the backend, creating a storage account, initializing the storage space, and authorizing the storage space.
Logging into the PBS Management Backend: After the system installation completes or after rebooting, the login details for the backend are presented. Enter the URL in a remote browser’s address bar to bring up the login window. The username is `root`, and the password is the one set during installation.
Creating a Storage Account: This account is used for authentication when the PVE client logs in. The username does not need to include “@pbs” unless connecting from a client, where this suffix is required.
Initializing Storage Space: Ensure that the backup storage space is recognized by the system and that it contains no data. If it does, back it up to another location and run `wipefs -a /dev/sdb` to clean it. Create a directory and mount the data disk automatically to the system. If the disk isn’t recognized, the disk may have existing data, which should be cleaned before refreshing the page to see if it’s detected. After creating the directory, return to the “Disks” sheet to observe changes.
Authorizing Storage Space: Once the above steps are completed, a “data” submenu appears under the “Datastore” in the web interface. Select this and authorize the storage. Choose users and roles from the dropdowns. The username will automatically have the “@pbs” suffix. After successfully creating the user, its path will be displayed. You can log into the system to verify this.
When backing up PVE virtual machines or containers, monitor the `.chunks` directory’s size to confirm that data is being written.
PBS Client Connection
Log into the Proxmox VE web management backend. Under “Datacenter” -> “Storage”, add PBS and fill in the relevant details from the PBS configuration.
For the ID, you can write anything as long as it’s valid (no red in the input box). The username must include the “@pbs” suffix, indicating that it’s for PBS authentication rather than the system’s PAM. The `Datastore` value should match the PBS settings; here, it’s “data”. For the fingerprint, return to the PBS management backend and find it under the “Dashboard” menu, then paste it into field 7. Back in the PVE storage configuration, click the link labeled 8 to set the backup retention limit to avoid filling up the storage space.
After verifying everything, click “Add.”
Verifying the PBS Client-Server Connection
To ensure the PBS client-server connection is correct, you can check:
Configuration file `/etc/pve/storage.cfg`: If it’s a cluster, you only need to check one PVE node; the others will sync automatically.
PVE Web Management Backend: Check the PBS storage summary. If the displayed capacity matches that allocated by PBS, the connection is successful; otherwise, it will show zero or unknown capacity.
PVE Virtual Machine Backup
Schedule backups according to specific needs. Some VMs may need daily backups, while others may only require weekly backups.
The most important thing is to specify the PBS storage name, in this case, `pbs108`, and select the virtual machines to back up. You can create multiple backup groups to flexibly manage data backups. For instance, back up application servers on Monday and database servers on Wednesday. After creating the backup tasks, test them by creating a backup job with one or a few VMs and running it immediately.
Once the task is executed, log into the PBS system and use `watch du -hs .chunks` to monitor changes in the `.chunks` directory’s size. You can also check the backup log in the PVE management backend. Similarly, the PBS server’s backend will show changes in data size.
Leave a Reply