PBS (proxmox backup server) early adopters

Author: Tian Yi (vx: formyz, mail: [email protected])

Finally, when pbs released the official version of pbs 1.0, I can’t wait to go to the official website to download the proxmox-backup-server_1.0-1.iso file, put the file in the iso directory of my proxmox VE, create a virtual machine, and use the pbs image file As a boot disk (of course, it can also be cloned into a u disk or dvd disk for installation on a physical server).
PBS (proxmox backup server) early adopters

Early planning

At least the following factors should be considered for backup:

  •  Capacity: Evaluate the total capacity of the virtual machine or container that needs to be backed up, and reserve enough margin. For example, if the virtual machine has 10T, the recommended backup capacity is 20-30T.
  •  Performance: The bottleneck that affects the backup writing performance is network bandwidth, disk IO, memory size and other factors. In order to obtain a larger capacity and a more economical cost, cheap SATA low-speed hard drives are often used. If too many virtual machine backups are required at a time, you must consider using SSDs to cache on the front end to improve performance. As far as the current market is concerned, the price of memory has been relatively low, and the cost of a backup server with 64G memory is not high. For network, gigabit and above are recommended.
  •  Availability: The system is separated from the backup storage space. The system disk is recommended to use SSD or high-speed SAS disk, two disks as raid 1; the disk for backup data should be at least raid 5 or higher.

Proxmox VE backup composition

The complete Proxmox VE backup includes the backup server and client, Proxmox VE 6.2 and above, and the client is automatically installed. Note that the client is installed in Proxmox VE (the Debian system of the physical machine), not the virtual machine or container in Proxmox VE. Pbs can be a physical machine or a virtual machine. In a production environment, it is strongly recommended to use a physical server with high availability.
PBS (proxmox backup server) early adopters

PBS client installation

Log in to the Promxox VE system and execute apt-get install proxmox-backup-client to install. If the pbs client already exists in the system, skip it directly. Through the PVE web management interface, there will be an item "Proxmox Backup Server" related to PBS in the drop-down list of adding storage.
PBS (proxmox backup server) early adopters

PBS system installation

Boot into the system installation guide interface, the cursor is positioned at the first item, and press Enter.
PBS (proxmox backup server) early adopters
You can read the following license agreement, and then click the agree button.
PBS (proxmox backup server) early adopters
Choose the PBS installation location. From the previous plan, we can see that there are at least two storage areas, one small area is used to install the system, and the other is used for the backup of PVE virtual machines or containers. So check the following to ensure that PBS is installed in a smaller area of ​​disk space.
PBS (proxmox backup server) early adopters
System time zone, you can manually enter China, and it can automatically fill in other items.
PBS (proxmox backup server) early adopters
Set the system password, develop a habit of paying attention to safety, and set up complex passwords. The value of the e-mail address cannot be verified by default. Change the suffix at will, for example, change it to com or net, and then proceed.
PBS (proxmox backup server) early adopters
The host name must also be changed during the network setting; the ip address should be filled in according to your own resource plan and must not conflict with other systems in the network.
PBS (proxmox backup server) early adopters
Summarize the interface, read it roughly, and after confirming that it is correct, click the install button "Install" to proceed to the next step.

Compared with proxmox VE, PBS has a much smaller capacity, so the installation speed is much faster than PVE. The installation is completed in a few minutes, and then it will automatically restart.
PBS (proxmox backup server) early adopters

The installation interface is as follows:
PBS (proxmox backup server) early adopters

PBS configuration

The PBS configuration is roughly divided into several parts: logging in to the background, creating a storage account, initializing storage space, and storage space authorization.

  1. Log in to the PBS management background. After installing the last interface of the system, or after the system is booted, you can intuitively understand the login method of the background management, as shown in the following figure:
    PBS (proxmox backup server) early adopters
    Enter the above URL in the remote browser address bar, and the login window will pop up. The account is root. The password has been set during the installation process.
    PBS (proxmox backup server) early adopters
  2. Create a storage account for client login on PVE for authentication.
    PBS (proxmox backup server) early adopters
    The user name does not need to add "@pbs", only when the client is connected, it needs to be added as the suffix. Pay attention to this.
  3. Initialize storage space. Make sure that the storage space used for backup is recognized by the system and there is no data on it. If there is data, back it up to another location first and execute wipefs -a /dev/sdb to clean it up.
    PBS (proxmox backup server) early adopters
    Create a directory and automatically mount the data disk to the system.
    PBS (proxmox backup server) early adopters
    If the disk that created the directory is not automatically recognized, it means that the reserved disk has data, and you need to clean it up as described above, and then refresh the page to see if it is recognized.
    PBS (proxmox backup server) early adopters
    After creating the directory, return to the sheet "disk" to view and observe the changes before and after.
    PBS (proxmox backup server) early adopters
    To sum up, the operations of the web management background mentioned above are disk partitioning, file system creation, mount point /mnt/datastore/data, and mount.
    PBS (proxmox backup server) early adopters
  4. Storage space authorization. After the above steps are executed, there is an additional "data" submenu under the menu "Data Storage" on the left side of the web management interface. Select this menu item and authorize it. br/>![](https://s4.51cto.com/images/blog/202011/28/bb18d0c71090cd759904a71a3d0db481.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_se,x_100 ,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=) The
    user and role are selected from the drop-down list box, and the user item is automatically suffixed in the form of "sery@pbs". After the creation is successful, the path used by this user is also displayed, as shown in the following figure:
    PBS (proxmox backup server) early adopters
    Although it starts with /datastore, this is not the absolute path of the system, we can log in to the system to verify it.
    PBS (proxmox backup server) early adopters
    Whenever a PVE virtual machine or container is backed up, you can verify whether data is written by viewing the changes in the size of the .chunks directory.

PBS client connection

Log in to the Proxmox VE web management background, add PBS to the "Storage" of the "Data Center" level, and fill in the relevant item values ​​according to the PBS settings. br/>![](https://s4.51cto.com/images/blog/202011/28/7182d3e73a12f2b16afa045e83e01c90.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se, ,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
Write the ID freely, as long as it meets the PVE requirements (the edit box does not display red); the user name should be written with the suffix "@pbs", which means that the verification area is PBS instead of the system PAM. The value of Datastore is exactly the same as the setting of PBS, where the setting is data. In this way, the fingerprint needs to be returned to the PBS management background, found under the "Dashboard" menu and copied to the box numbered 7.
PBS (proxmox backup server) early adopters
Switch to the PVE add storage PBS interface, click the number 8 link, you can set the number of reserved backups to avoid the storage space from being full.
PBS (proxmox backup server) early adopters
Click the "Add" button after confirmation.

Verify the correctness of the connection between PBS client and server

From two aspects, we can roughly understand the correctness of the PBS client connection: the storage configuration of pve and the size of the PBS allocated space obtained by the web management interface.

  •  Configuration file /etc/pve/storage.cfg. If it is a cluster, you only need to log in to any PVE to view, and other nodes will automatically synchronize.
    PBS (proxmox backup server) early adopters
  •  PVE web management background, check the PBS storage summary, the display capacity is roughly the same as the capacity allocated by PBS, it is a valid addition, otherwise its capacity is zero or unknown.
    PBS (proxmox backup server) early adopters

PVE virtual machine backup

Arrange a backup plan according to the specific situation. Some virtual machines may need to be backed up every day, while some may be backed up once a week.

Select the virtual machine that needs to be backed up and set the relevant item values, as shown in the figure: The
PBS (proxmox backup server) early adopters
most important point is that the storage must clearly specify the name of the added PBS storage, here is pbs108, and then check the virtual machine to be backed up. Multiple groups can be established for backup jobs for more flexible data backup. For example, back up the application server on Monday, and back up the database server on Wednesday... After the backup task is created, we cannot know whether the backup works normally. A feasible way is to create a separate backup job containing one or a few virtual machines, and then immediately let it perform the backup.
PBS (proxmox backup server) early adopters
Once the task is executed, log in to the PBS system and use watch du -hs .chunks to view the changes in the storage directory .chunks space size.
PBS (proxmox backup server) early adopters
You can also view the backup log output from the PVE management background.
PBS (proxmox backup server) early adopters
Similarly, in the background of the PBS server, you can also see changes in the amount of data.
PBS (proxmox backup server) early adopters

Still short of recovery steps, continue...

Guess you like

Origin blog.51cto.com/sery/2556374