Compared to using NFS to back up virtual machines or containers on Proxmox VE, PBS (Proxmox Backup Server) is much more efficient, particularly in terms of backup speed. Despite this, I’m concerned about the availability of PBS. If PBS data is lost, the consequences would be severe. With NFS, you can use rsync to synchronize backup data to another system, ensuring that PVE has at least two offsite copies.
After upgrading PBS from version 1.X to 2.X, I checked the Web management interface to see what had changed. Besides the added support for tape drives, there were no new features. Then something caught my eye—the “Remote” menu item. Out of curiosity, I wondered, “What is this feature for?”
After some trial and error, I finally understood that this feature is for remote synchronization in PBS. The official documentation describes the remote feature as follows: “A remote refers to a separate Proxmox Backup Server installation and a user on that installation, from which you can sync datastores to a local datastore with a Sync Job.” The specific synchronization structure is not explained in further detail.
PVE backs up data to the primary PBS, and the secondary PBS pulls the data from the primary PBS and synchronizes it. You can sync the primary PBS data to a single secondary PBS or multiple PBS systems, further enhancing data reliability.
Preparations
Install the Secondary PBS System
Prepare a host with disk capacity equal to or greater than that of the primary PBS and install the PBS system. Set up the IP address.
Secondary PBS Configuration
Log into the secondary PBS web management interface and follow these steps:
1. Create a User: This user will be used by PVE to connect. If the primary PBS is unavailable, this user can restore virtual machines or containers directly from the secondary PBS.
2. Create a Data Directory: This directory will store data synchronized from the primary PBS. Ensure that the available capacity is greater than or equal to that of the primary PBS.
The directory name will be the mount point of the disk.
Once created, the mount point name “mydata” will automatically appear in the left menu.
3. Grant Storage Authorization: Select the user and role from the dropdown menus. The username will automatically be appended with the suffix, resulting in a format like “sery@pbs”.
Add the Primary PBS (Remote)
Add the remote host using the primary PBS settings. The “Verification ID” is the username set on the primary PBS, and the host is the resolvable hostname or IP address of the primary PBS.
You will need to obtain the fingerprint by logging into the primary PBS web interface and clicking the “Show Fingerprint” button to copy it.
Data Synchronization
The synchronization process involves the secondary PBS pulling data from the primary PBS. It’s important to note that the synchronization is performed from the secondary PBS, not the other way around. At first, I made the mistake of trying to push data from the primary PBS to the secondary PBS.
Add a Data Sync Job
When adding a data sync job, while the terms “local datastore” and “source datastore” might be confusing, the good news is that once you select the “Source Remote” (i.e., the primary PBS), you can choose the correct source datastore from the dropdown without manual entry.
Once the setup is complete, if the connection to the primary PBS is successful, a green checkmark will appear next to the status.
Manually Sync Data
Log into the primary PBS web interface to check if there are any backup data. If not, go to the PVE system and immediately back up some virtual machines.
Now that there are two backed-up virtual machines on the primary PBS, return to the secondary PBS web interface, check the data directory to see if any data is present, and then proceed with the data sync. Once the sync is complete, compare the data.
Click the “Run Now” button to initiate the sync job.
During the sync, the logs will display the sync progress—keep an eye on this.
If the log shows “TASK OK,” it indicates that the sync operation has completed. Switch to the secondary PBS’s data storage and check whether the data files have been generated.
To verify the reliability of the synced data, try restoring one of the backups from the secondary PBS to PVE.
Leave a Reply