Setting Up Bacula, the Modular Backup Solution

0
88

Bacula is an open source, enterprise-level computer backup system for heterogeneous networks, which is distributed and highly customisable. It is designed to automate backup tasks that often require intervention from a systems administrator or computer operator. This article introduces readers to the basics of Bacula.

Figure 1: Bacula’s components

Let me begin with sharing a real-life example of my use of Bacula. One of our projects involved using virtual machines installed on our workstation. This allowed us to quickly spin up different environments that were needed for development and testing. However, we needed a robust backup solution that allowed us to save the information not only on our VMs but also on our other machines that were running different operating systems. VMs come with the ability to take snapshots of the current state and we experimented with this feature, as well as exporting an image of the current state of the virtual machine as a backup solution. However, this proved time consuming and didn’t provide a solution for our Windows and Linux hosts. So we searched for a more robust backup solution, which ultimately turned out to be Bacula.

Architecture
Bacula comprises the following five major components or services —director, console, client, storage and catalogue.

It is a completely modular backup solution, allowing us to scale quickly by moving the individual components onto their own computers, or even hosting multiple computers – each running their own file, storage or database servers. Even with multiple database servers, or multiple file servers, we can still manage everything from one director instance. For example, we can add new file, database and storage servers to the director’s configuration file, thus expanding the capabilities of the backup solution. However, the capabilities of Bacula are far too many to list here. In fact, this article aims to provide just enough information to get readers started.

The setup for this article is very simplistic — it consists of one client and one server. In this example, the server hosts all the components — the file, storage, database and director. Though simplistic, the setup serves the purpose of getting Bacula up and running with minimum effort.

Installing the Bacula server
Let us configure the Bacula server on an Ubuntu 18.04 server. To do so, issue the following command:

sudo apt install bacula

The apt process will ask whether you want to install the Bacula server package and any other necessary requirements. Go ahead and answer ‘Yes’ to that. This should start the downloading, installation and configuration process for the Bacula server and any packages it relies on.

During the installation process you’ll be asked several configuration questions, starting with the setup of Postfix. (This is Wietse Venema’s mail server that started life at IBM Research as an alternative to the widely-used Sendmail program. It attempts to be fast, easy to administer and secure.) Postfix is the package that you can configure to send you email updates.

Select the Internet site and press ‘Okay’.
For the mail name, we’ll just use the hostname. Bacula works with both Postgres and MySQL. I have chosen Postgres as it was already installed on my system.

Now that we have all the packages installed for the server, we’ll move to the client and install the bacula-client package.

Figure 2: Postfix configuration

Installing Bacula on the client
To install Bacula on the client, use the following command:

sudo apt install bacula-client

Confirm that you want to install the client package and then wait until all the packages have been downloaded and installed. Once done, ensure that you have all the configuration files in /etc/bacula. Inside that directory, you should see bacula-fd.conf, common_passwords, bconsole and a scripts directory.

That is it for the Bacula installation and the initial setup.

Why Bacula is more popular than other solutions
There are many advantages Bacula offers that other backup solutions do not. These include the following:

  1. There is a client for each machine, so you can back up and recover client data of any type, ensuring that all attributes of files are properly saved and restored.
  2. Bacula uses well-defined (IANA registered) TCP/IP ports — with no rpcs or shared memory.
  3. Any SQL database engine can be used, making Bacula very flexible. Currently, there are drivers for MySQL, PostgreSQL and SQLite.
  4. It handles multi-volume backups and has a built-in job scheduler.
  5. Bacula is four times as fast as any other commercial application, probably because those applications store their catalogue information in a large number of individual files rather than in an SQL database as Bacula does.
Figure 3: The next step in the Postfix configuration
Figure 4: Configuring Bacula with Postgres

When and where Bacula should be used
For programs such as tar, dump, or bru that are used to back up your computer data, you would like a network solution, more flexibility, or catalogue services. In such cases, Bacula will most likely provide the additional features you want.

If you would like a backup program that can write to multiple volumes (i.e., which is not limited by your tape drive’s capacity), Bacula can most likely fill your needs. In addition, quite a number of Bacula users report that it is simpler to set up and use than other equivalent programs.

Figure 5: Bacula on the client

If you are currently using a sophisticated commercial package such as Legato Networker, ARCserveIT, Arkeia, or PerfectBackup+, you may be interested in Bacula, which provides many of the same features and is free software available under the Affero GPL Version 3 software licence.

This article gives you a brief introduction to Bacula configuration. If you get stuck, the Bacula website has an excellent manual that you can read.

LEAVE A REPLY

Please enter your comment!
Please enter your name here