Incremental backup in Proxmox VE using VBR

Incremental backup in Proxmox VE using VBR
In one of previous articles cycle about the Proxmox VE hypervisor, we have already talked about how to backup using standard tools. Today we will show you how to use the excellent Veeam® Backup&Replication™ 10 tool for the same purposes.

“Backups have a clear quantum nature. Until you try to restore from a backup, it is in superposition. He is both successful and not.” (found on the internet)

Disclaimer:

This article is a free and extended translation on the topic bagpipeposted on the Veeam forum. If you act strictly according to the original guide, then even at the first stage of installing pve headers you will get an error, because the system simply will not know where to take them. There are plenty of unobvious moments.

No, I'm not saying that this is the ideal backup method. No, it cannot be recommended for production. No, I do not guarantee the perfect integrity of the backups made.

However, it all works and is quite suitable for many users and novice system administrators who are taking their first steps in learning about virtualization and backup systems.


Backup is perhaps one of the most important processes on which the work of any company depends. Nothing is more valuable than the data stored in corporate information systems, and nothing is worse than not being able to restore it in the event of a failure.

It often happens that people think about the need for a backup and the choice of a tool only after an emergency has already occurred, associated with the loss of critical data. As virtualization technologies evolved, backup applications began to focus on close interaction with hypervisors. The Veeam® Backup&Replication™ product is no exception. It has extensive backup capabilities in virtualized environments. Today we'll show you how to set it up to work with Proxmox VE.

Setting up the hypervisor

We will use the current version of Proxmox at the time of this writing - 6.2-1. This version was released on May 12, 2020 and contains a lot of useful changes, which we will discuss in one of the following articles. For now, let's start preparing the hypervisor. The main task is to install Veeam® Agent for Linux on a redundant host with Proxmox. But before that, let's do a few things.

System preparation

Install the utility sudo, which is missing from the system if Proxmox was installed not on an existing Linux system, but as a standalone OS from official image. We also need pve kernel headers. We go to the server via SSH and add a repository that works without a support subscription (it is officially not recommended for production, but it contains the packages we need):

echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" >> /etc/apt/sources.list

apt update

apt install sudo pve-headers

After this procedure, be sure to restart the server.

Installing Veeam® Agent

Download the deb package Veeam® Agent for Linux from the official website (requires an account), arm yourself with an SFTP client and upload the resulting deb package to the server. Install the package and update the list of programs in the repositories that this package adds:

dpkg -i veeam-release-deb_1.x.x_amd64.deb

Update the repositories again:

apt update

Install the agent itself:

apt install veeam

Check that everything is installed correctly:

dkms status

The answer will be something like this:

veeamsnap, 4.0.0.1961, 5.4.41-1-pve, x86_64: installed

Setting up Veeam® Backup&Replication™

Adding a repository

Of course, you can also store backups directly on a server with Veeam® Backup&Replication™ deployed, but it is still more convenient to use external storage.

Go to the section BACKUP INFRASTRUCTURE:

Incremental backup in Proxmox VE using VBR
Select the item Backup Repositories, press the button Add Repository and in the window that appears, select Network attached storage:

Incremental backup in Proxmox VE using VBR
For example, let's take a test SMB storage, I have a regular QNAP:

Incremental backup in Proxmox VE using VBR
Fill in the name and description, then click the button Next:

Incremental backup in Proxmox VE using VBR
Enter the SMB storage address and, if it requires authorization, click Add to add access details:

Incremental backup in Proxmox VE using VBR
Fill in the username and password to access the SMB storage, and then click the button OK and, returning to the previous window, - Next:

Incremental backup in Proxmox VE using VBR
If everything is done without errors, the program will connect to the storage, request information about the available disk space and display the following dialog box. In it, set additional parameters (if necessary) and click the button Next:

Incremental backup in Proxmox VE using VBR
In the next window, you can leave all the default options and also click Next:

Incremental backup in Proxmox VE using VBR
We check that the necessary components are installed and are in the status already exists, and press the button Apply:

Incremental backup in Proxmox VE using VBR
At this point, Veeam® Backup&Replication™ will connect to the storage again, determine the required settings, and create the repository. Click Next:

Incremental backup in Proxmox VE using VBR
We check the summary information about the added repository and press the button Finish:

Incremental backup in Proxmox VE using VBR
The program will automatically offer to save its configuration files in a new repository. We do not need this, so we answer No:

Incremental backup in Proxmox VE using VBR
Repository added successfully:

Incremental backup in Proxmox VE using VBR

Creating a backup job

In the main Veeam® Backup&Replication™ window, click backup joblinux computer. Choose a type Server & Hosting and the regime Managed by backup server:

Incremental backup in Proxmox VE using VBR
Give the task a name and optionally add a description. Then press Next:

Incremental backup in Proxmox VE using VBR
Next, we need to add all the servers with Proxmox that we will back up. To do this, press Addindividual computer. Enter the hostname or IP address of the server and access details. Thus we form a list Protected computers and push Next:

Incremental backup in Proxmox VE using VBR
Now a very important point, namely the choice of data to be added to the backup. Everything will depend on where exactly your virtual machines are located. If you want to add only some logical volume, then you need the mode volume level backup and choose the path to the logical volume or device, for example /dev/pve. All other steps are identical.

For this article, we will show how the mode works. File level backup:

Incremental backup in Proxmox VE using VBR
In the next window, we form a list of directories for backup. Click Add and prescribe the directories where the configuration files of virtual machines are stored. The default is the directory /etc/pve/nodes/pve/qemu-server/. If you use not only virtual machines, but also LXC containers, then add the directory /etc/pve/nodes/pve/lxc/. In my case, this is also a directory /date.

Having thus formed a list of directories, press Next:

Incremental backup in Proxmox VE using VBR
From the dropdown list of repositories, select Storagecreated earlier. Determine the chain length for an incremental backup. The more points in retention policythe more space you save. But at the same time, the reliability of the backup will decrease. Reliability is more important to me than the amount of storage space, so I put 4 points. You can take the standard value 7. Continue setting up the task by clicking Next:

Incremental backup in Proxmox VE using VBR
Here we leave the parameters unchanged, just go to the following window:

Incremental backup in Proxmox VE using VBR
Setting up the scheduler. This is one of the coolest features to make the life of a system administrator easier. In the example, I chose to automatically start the backup every day at 2 am. Another great feature is the ability to interrupt the backup job if we go beyond the time limit of the allotted “backup window”. Its exact schedule is formed through the button Window:

Incremental backup in Proxmox VE using VBR
Again, as an example, let's assume that we only perform backups during non-working hours on weekdays, and on weekends we are not limited in time at all. We form just such a beautiful table, return to the previous window and click Apply:

Incremental backup in Proxmox VE using VBR
It remains only to check the summary information about the task and press the button Finish:

Incremental backup in Proxmox VE using VBR
This completes the creation of the backup task.

Making a backup

Everything is elementary here. In the main window of the program, select the created task and click Home. The system will automatically connect to our server (or several servers), check the storage availability and reserve the required amount of disk space. Then, in fact, the backup process will begin, and upon completion we will receive comprehensive information about the process.

If in the process of starting a backup a problem like Failed to load module [veeamsnap] with parameters [zerosnapdata=1 debuglogging=0], then you need to rebuild the module veeamsnap in accordance with Instructions.

Incremental backup in Proxmox VE using VBR
What is especially interesting is that on the server itself, we can see not only a list of all completed backup tasks, but also monitor the process in real time with the command veeam:

Incremental backup in Proxmox VE using VBR
Predicting the question of why the console looks so strange, I will say right away: I really like how the console looks on the screen of a warm tube CRT monitor. This is done using a terminal emulator. cool-retro-term.

Восстановление данных

Now the most important question. But how to recover data if something irreparable happens? For example, the wrong virtual machine was accidentally deleted. In the Proxmox GUI, it disappeared altogether, nothing was left in the storage where the machine was.

The recovery process is simple. We go to the Proxmox console and enter the command:

veeam

We will see a list of completed backups. Select the desired arrows and press the key R. Next, select a restore point and click Enter:

Incremental backup in Proxmox VE using VBR
After a couple of seconds, the restore point will be mounted to the directory / mnt / backup.

It remains only to copy the virtual drives and configuration files of virtual machines to their places, after which the “killed” machine will appear in the Proxmox VE GUI automatically. You will be able to launch it normally.

To unmount the recovery point, you should not do it manually, but you need to press the key U in utility veeam.

That's all.

May the force be with you!

Previous articles on the Proxmox VE hypervisor:

Source: habr.com

Add a comment