Create Linux Backup Repository with Veeam

Here we are at the final stage with the Veeam Backup & Replication overview series touching upon different components and their configurations. In this article we’ll review the steps on how to create a Linux Backup Repository Server.

There are many advantages on why and how we should leverage Linux as a Backup Repository for Veeam Backups. First and probably the easiest is the opportunity to leverage heterogeneous hardware running different Linux distributions. This can be a combination of commercial and free releases. In both cases we can take advantage of the storage managed by these boxes to further extend the available space for Backups Jobs and Backup Copy Jobs.

More importantly from a security perspective by leveraging multiple and different file-system types we can simply harden our Backup infrastructure. This is very important to help achieving the widely adopted 3-2-1 rule and protecting against ransomware. Challenging attackers with different file-systems also by using different or separate mechanisms of authentication is definitely making their job harder.

In particular we’ll review the options to configure storage on a Ubuntu Linux as Veeam Backup Repository. Depending on resources available there are three types of storage we can leverage on a Linux server as Backup Repository: Local Storage, directly attached and NFS Shares.

For the purpose of this article we’ll point to a local folder on the main Disk. Additionally it is possible to provide more storage by mean of adding new virtual Disks to the same Linux box and configure them as a Linux backup Repository. Alternatively we can also choose NFS Shares directly mounted to the Linux box as a Linux Backup Repository as well.

We’ll run this configuration in three simple steps, in particular we need to:

  • Install the minimum prerequisites on the Linux machine
  • Add Linux box to the List of Veeam Managed Servers
  • Configure the Linux Backup Repository

Let’s get started with the first step about the prerequisites.


Linux Backup Repository install prerequisites

There are essentially 3 main prerequisites we need to make sure are present in our Linux server: SSH server, Perl Modules and a User part of sudoers file that Veeam will use to connect to and manage the Linux Backup Repository.

So in this case let’s start with the SSH Server. The majority of Linux distribution ship with a built-in software repository nowadays. And this is the case also for Ubuntu Linux with “apt-get”. We’ll use this one to easily install the required components starting from the SSH server.

From the Terminal let’s issue the command:

sudo apt-get install openssh-server

Linux Backup Server openssh

Apt-get will scan it’s own repository to check for the latest version and pertinent dependencies. When ready we can simply hit “y” to continue.

Linux Backup Server openssh install

The installation won’t take long. Actually a matter of a few seconds or a few minutes depending on the missing requirements and internet connection. When the installation completes we can check if the SSH Server demon or service is up and running.

To check the status simply issue the command:

sudo service ssh status

The screenshot below should show something similar to this.

Linux Backup Server openssh status

The previous screen also indicates the SSH server is running on default Network Port 22. To check connectivity to this Server and Port and more simply to this network socket as IPAddress plus Port we can launch a telnet command prompt from a Windows machine. In this case we can start this command from the Veeam Backup & Replication Server. The screenshot below shows a quick example.

Linux Backup Server check ssh

As we can tell from this screen the port is open and the connection to the SSH Server possible. This is also useful to quickly rule out or adjust firewall rules.

Linux Backup Server ssh open port

At this point we can stop the connection test by hitting “enter” or simply closing the command window.

Linux Backup Server ssh terminal

The next prerequisite refers to the installation of Perl Modules. In order to work for a Linux Backup Repository it is important the Linux machine is running on a 32Bit system. Should the server run on a 64Bit system we than need to install Perl modules in 32Bit compatibility mode. The following is the full list of Perl Modules to install:

  • constant
  • Carp
  • Cwd
  • Data::Dumper
  • Encode
  • Encode::Alias
  • Encode::Config
  • Encode::Encoding
  • Encode::MIME::Name
  • Exporter
  • Exporter::Heavy
  • File::Path
  • File::Spec
  • File::Spec::Unix
  • File::Temp
  • List::Util
  • Scalar::Util
  • Socket
  • Storable
  • threads

All we have to do is just issue the command as per screenshot below:

sudo cpan constant Carp Cwd Data::Dumper Encode Encode::Alias Encode::Config Encode::Encoding Encode::MIME::Name Exporter Exporter::Heavy File:::Path File::Spec File::Spec::Unix File::temp List::Util Scalar::Util Socket Storable threads

Linux Backup Server cPan modules

Unless we prefer to configure them manually we can simply accept the default configuration. Let’s hit yes to continue.

Linux Backup Server cPan install

Last step in terms of prerequisites is to add a User we intend Veeam to use to help configuring and managing the target storage as Linux Backup Repository. We can do this by manually adding the entry in the sudoers file. In my example this looks like the screenshot below. By running the command:

sudo visudo

we can add a line similar to the following:

username ALL=() NOPASSWD: ALL

replacing the username with the intended user. Finally a CTR+O to save the file and CTRL+X to exit the editor.

Linux Backup Server edit sudoers


Add Linux Backup Repository as Managed Server

The next step is to add the Linux machine in the list of Veeam “Managed Servers”. This machine will simply control and give access to the Backup Repository. The Veeam Backup & Replication Server instead will communicate with the Linux machine using the SSH protocol on port 22.

As per usual from the main menu on the Backup Infrastructure view in the console let’s add a new Managed Server. From the wizard we’ll select the Linux Server type.

Linux Backup Server install

Next we specify the Hostname of the Linux machine. I would recommend to use static IP addresses for such server as best practices. Also let’s make sure DNS name resolutions is working both ways also when using FQDN names.

Linux Backup Server name

Next we specify the credentials to connect over SSH to the Linux machine. In case this user account does not exist yet we can click on Add button and create this on the fly. From here we can also choose a different Network Port for SSH to use if desired. Of course let’s make sure the SSH Daemon is set up accordingly.

Linux Backup Server ssh credentials

We can now specify the Credentials to use. We need to elevate the account to root but we don’t need to add this account to sudoers file automatically as already there.

Linux Backup Server ssh credentials

At this point the wizard will try the connection with the intended user. If everything is in place we need to accept the SSH key fingerprint. And yes, we do trust this server! 🙂

Linux Backup Server select user

The wizard now shows a quick summary before committing the changes.

Linux Backup Server install summary

Configure Linux Backup Repository Server

We are now ready for the final step: Configure the Linux Backup Repository Server.

From the Backup Infrastracture view let’s add a new Backup Repository and specify a name with a description. The latter is optional.

Linux Backup Server Name

In the server type let’s choose Linus as indicated in the screenshot as well. In our case the Backup Repository will use internal storage.

Linux Backup Server Type

At this point the wizard will show in the drop-down all the compatible Managed Servers based on our previous selection.

Linux Backup Server

When clicking on Populate this will show the Disk and Partitions layout with mount points. Should this phase take a long time or not appear at all this means the prerequisites are not working as expected. In the case of a 64Bit Linux machine let’s make sure Perl is installed with 32Bit compatibility mode. Let’s click on next to specify the storage to use.

Linux Backup Server Storage

At this point we can browse to the intended location for the Linux Backup Repository.

Linux Backup Server select storage

In my case this is a folder under my profile. I will use this as test. When setting up a Backup Repository of course we can also configure other settings like the number of concurrent tasks, which is based on current number of CPUs on the Backup Repository server and also limit the Read/Write data rates should we desire to slow down Veeam Backup and Restore activities.

The Advanced options give us the opportunity to enable finer settings like:

  • Align Backup file data blocks
  • Decompress Backup Data Blocks before storing
  • Specify the Repository as using Rotated Drives
  • Use per-VM Backup files

Depending on the underlying storage we can further optimise the Backup Jobs using these options.

Linux Backup Server repository

In this steps we can specify which machine with the Veeam Mount server role we want to use when running Restore Jobs which leverage the vPower NFS as well to run such jobs like Instant VM Recovery, SureBackup and OnDemand Sandbox. We’ll dedicate specific articles to cover these topics.

Linux Backup Server mount server

And finally a review of the main settings before applying for the updates as per screenshot below. As part of the wizard when creating a new Backup Repository we can also import existing Backups and pertinent File-System Index files if in use.

Linux Backup Server review

When clicking apply we can see the summary of operations relative to the installation of the required components. The operation is very fast.

Linux Backup Server install summary

And finally when browsing the Backup Repository list we can see the Linux Backup Repository we just added and ready to use to store our Backup Jobs and Backup Copy Jobs.

Linux Backup repository ubuntu

This concludes a quick series of articles on the Veeam Backup & Replication overview. We can now use this one as a base for testing in our home lab. In my case this will also be the foundation to add more infrastructure components and run even more jobs types to explore all the benefits and features packed in this solution.

ایجاد Repository بکاپ لینوکس در نرم افزار Veeam
استوریج VNX
فروشگاه اینترنتی تکین مال
سرور اختصاصی ایران

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *