Proxmox VE incremental backup with VBR


In one of the previous articles in the Proxmox VE hypervisor series, we already talked about how to backup using regular tools. Today we show how to use the excellent Veeam® Backup & Replication ™ 10 tool for the same purpose.

“Backups have an explicit quantum essence. Until you tried to recover from the backup, it is in superposition. He is both successful and not. ” (found on the Internet)

Disclaimer:

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

However, all this works and is quite suitable for many users and novice system administrators who take the first steps in the study of virtualization and backup systems.

Backup is perhaps one of the most important processes on which the work of any company depends. There is nothing more expensive than data stored in corporate information systems, and there is nothing worse than the lack of the ability to recover it in the event of a failure.

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

Hypervisor Setup


We will use the current version of Proxmox at the time of 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 we take a few steps.

System preparation


We install the sudo utility , which is absent in the system if Proxmox was not installed on an existing Linux system, but as a standalone OS from an official image . We will also need the pve headers of the kernel. We go to the server through SSH and add a repository that works without a support subscription (officially it is 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.

Install Veeam® Agent


Download the Veeam® Agent for Linux deb package from the official website (an account is required), arm yourself with an SFTP client and upload the received 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

Updating the repositories again:

apt update

Install the agent itself:

apt install veeam

We check that everything was installed correctly:

dkms status

The answer would be something like this:

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

Configuring Veeam® Backup & Replication ™


Adding a repository


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

Go to the BACKUP INFRASTRUCTURE section :


Select the Backup Repositories item, click the Add Repository button and select Network attached storage in the window that appears :


For example, let's take a test SMB-storage, I have this is the usual QNAP:


Fill in the name and description, then click the Next button :


Enter the address of the SMB storage and, if it requires authorization, click Add to add access details:


Fill in the username and password to access the SMB storage, and then click OK and returning to the previous window, Next :


If everything is done without errors, the program will connect to the repository, request information about the available disk space, and display the following dialog box. In it, set additional parameters (if necessary) and click Next :


In the next window, you can leave all the default settings and also click Next :


We check that the necessary components are installed and are in the status already exists , and click the Apply button :


At this point, Veeam® Backup & Replication ™ will once again connect to the repository, determine the necessary parameters and create a repository. Click Next :


We check the total information about the added repository and click the Finish button :


The program will automatically offer to save your configuration files in a new repository. We do not need this, so we answer No :


Repository successfully added:


Creating a backup job


In the main window of Veeam® Backup & Replication ™, click Backup Job - Linux computer . Choose Server type and Managed by backup server mode :


We give a name to the assignment and optionally add a description. Then click Next :


Next, we need to make all the servers with Proxmox that we will back up. To do this, click Add - Individual computer . Enter the hostname or server IP address and access details. Thus, we form the list of Protected computers and click Next :


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 any logical volume, you need the Volume level backup mode and choose the path to the logical volume or device, for example / dev / pve . All other actions are identical.

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


In the next window, we create a list of directories for backup. Click Add and prescribe the directories where virtual machine configuration files are stored. By default, this is the directory / etc / pve / nodes / pve / qemu-server / . If you use not only virtual machines, but also LXC containers, add the directory / etc / pve / nodes / pve / lxc / . In my case, it is also the / data directory .

Having formed the list of directories in this way, click Next :


From the drop-down list of repositories, select Storage created earlier. We determine the length of the chain for incremental backup. The more points there are in the Retention policy , the more space you will save. But along with this, 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 of 7 . We continue to configure the task by clicking Next :


Here we leave the parameters unchanged, just go to the next window:


We configure the scheduler. This is one of the coolest features to make life easier for the system administrator. In the example, I chose to automatically start the backup every day at 2 a.m. Another great feature is the ability to interrupt the backup task if we go beyond the time limit of the allotted “backup window”. Its exact schedule is configured through the Window button :


Again, for example, suppose that we perform backups only during non-working hours on weekdays, and on weekends we are generally not limited in time. We form such a beautiful table, return to the previous window and click Apply :


It remains only to check the summary information about the task and click the Finish button :


This completes the creation of the backup job.

Backup


Everything is elementary here. In the main window of the program, select the created task and click Start . The system will automatically connect to our server (or several servers), check the availability of the storage and reserve the necessary amount of disk space. Then, in fact, the backup process will begin, and upon completion we will receive comprehensive information about the process.
If a problem of the form Failed to load module [veeamsnap] with parameters [zerosnapdata = 1 debuglogging = 0] occurs during the backup startup process , then you need to rebuild the veeamsnap module in accordance with the instructions .

What is especially interesting is that on the server itself we can see not only a list of all completed backup tasks, but also watch the veeam command in real time :


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

Data recovery


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

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 arrow with the arrows and press the R key . Next, select a recovery point and press Enter :


After a couple of seconds, the recovery point will be mounted in the / mnt / backup directory .

All that remains is to copy the virtual drives and configuration files of the virtual machines in their places, after which the "killed" machine will appear automatically in the Proxmox VE GUI. You can run it in the usual way.

To unmount the recovery point, you should not do this manually, but you must press the U key in veeam utility .

That's all.

May the Force be with you!

Previous articles on the Proxmox VE hypervisor:


All Articles