In the projects I manage, there are Proxmox VE clusters as well as some standalone PVEs. I plan to back up the virtual machines from both the clusters and standalone PVEs to a single large-capacity storage. This approach not only effectively utilizes resources but also significantly reduces costs and management overhead. If each PVE had its own backup storage system, the management costs would increase significantly. To ensure the reliability of the backup data, an additional storage unit will be added to synchronize the backup data, making the setup nearly foolproof.
Storage Planning
A 2U server is prepared, with two 256GB SSDs configured as RAID 1 for installing the PBS system; four or more 12TB SATA hard drives will be used for backup data storage; 32GB of memory, a single CPU, and a gigabit network. In the backup storage space, different directories are created to distinguish different data sources. For example, `pve_cluster` represents the cluster backup path, and `PVE54` represents the backup directory for a standalone PVE. By organizing directories in this way, we can avoid VM ID conflicts and make future recovery more straightforward.
Project Implementation
After multiple discussions and persuasion, and with the recent failure of the old storage (NFS), the decision-maker finally agreed to spend money on purchasing equipment. I asked the equipment supplier to pre-install the PBS system before shipping it to the data center for rack installation. This way, we don’t have to go to the data center ourselves, and the data center technicians can help with the rack installation. As long as we can remotely log in (mainly via SSH), we can proceed with the subsequent operations.
After the rack installation is complete, log into the PBS Web management interface to check if the capacity is correct.
PBS User Addition
The purpose of adding users is to allow PVE to authenticate and connect to PBS through this account, which is a necessary operation. If both PVE and PBS are in a protected internal network, you can grant maximum permissions to avoid insufficient privileges. In my case, multiple PVEs will be backed up simultaneously, so multiple accounts need to be created.
Log into the PBS Web management interface, go to “Access Control” under “Configuration” in the left-hand main menu, click the “Add” button, and then enter the relevant information.
Repeat the above steps to create two accounts. The username does not need to include “@pbs”; it only needs to be added as a suffix when connecting from the client.
Disk Space Allocation
Initialize the free disk where the data storage is located, automatically mount the partition, and create directories `pve_cluster` and `pve54` on it as follows:
1. Create the backup disk mount point.
Note: The disk must be unpartitioned to be recognized!
2. The directory creation process is essentially the process of partitioning, creating a file system, and then mounting the file system. Log into the system and execute the command `df -h` in the command line to verify the situation.
3. Add subdirectories `pve_cluster` and `pve54`. When filling in the absolute path, enter something like `/mnt/datastore/pbs_data/pve_cluster`.
Data Storage Authorization
Previously, we created two subdirectories, `pve_cluster` and `pve54`, which are used for backing up different PVE virtual machines. Now, we need to authorize these directories, assigning `pve_cluster` to the user `pve_cluster` and `pve54` to the user `pve54`. Select the data storage directory `pve_cluster`, and click the “Permissions” button.
Repeat this step to authorize the `pve54` directory.
Connecting PVE to PBS
Log into the PVE Web management interface, go to the “Data Center” menu on the left, and add storage by selecting “Proxmox Backup Server.”
Enter the information according to the PBS settings in the corresponding fields. The fingerprint information can be obtained and copied from the PBS “Dashboard” menu by clicking the “Show Fingerprint” button.
If the connection is correct, information will be displayed in the overview of the PVE management interface.
Repeat this step to connect the PVE cluster to PBS.
The only difference from the previous PVE is the username and data storage directory (“Datastore”), everything else remains the same.
PVE Backup Testing
Manually back up from both the PVE cluster and the PVE standalone node. After the backup is completed, check the generation of backup files to see if it meets our expectations.
1. Manual Backup from PVE Standalone Node
In the PVE Web management interface, randomly select a virtual machine, choose the newly set `pbs250` as the storage, and after confirming, click the “Backup Now” button.
The backup process can be monitored in the PBS Web management interface.
2.Manual Backup from PVE Cluster
The process is exactly the same as the standalone node backup, so it won’t be elaborated further. If the tests show no issues, you can set up automatic backup tasks in PVE.
Since the data risk is high with only one PBS, an additional PBS needs to be prepared for backup data synchronization.
Leave a Reply