Middleware and Databases Expert

How to Install Bacula Bacup Server on Centos/Almalinux 8

Bacula is a set of computer programs that permits the system administrator to manage backup, recovery, and verification of computer data across a network of computers of different kinds.

It is an open source network backup solution that allows you create backups and perform data recovery of your computer systems. It is very flexible and robust, which makes it, while slightly cumbersome to configure, suitable for backups in many situations. A backup system is an important component in most server infrastructures, as recovering from data loss is often a critical part of disaster recovery plans.

Bacula can also run entirely upon a single computer and can backup to various types of media, including tape and disk.

Hi guys ! today we will install bracula on centos 8.

A Bacula server, which we will also refer to as the “backup server”, has these components:

  • Bacula Director: Software that controls the backup and restore operations that are performed by the File and Storage daemons
  • Storage Daemon: Software that performs reads and writes on the storage devices used for backups
  • Catalog: Services that maintain a database of files that are backed up. The database is stored in an SQL database such as MySQL or PostgreSQL
  • Bacula Console: A command-line interface that allows the backup administrator to interact with, and control, Bacula Director

Let’s have the prerequisites

I have added the FQDN as follows

[bacula@bacula ~]$ hostname

I kept SELinux & Firewalld service disabled

Final config as bellow:

Now it’s time to install. Bacula uses an SQL database, such as MySQL or PostreSQL, to manage its backups catalog. We will use MariaDB in this tutorial to install it.

sudo dnf install -y bacula-director bacula-storage bacula-console bacula-client mariadb-server

Wait for the installation to finish

After waiting sometime, we are done with installation

Start the mariadb service & check it’s status

sudo systemctl start mariadb
sudo systemctl status mariadb

mariadb service should have active(running) mode.

let’s create the Bacula database user and tables, with these scripts

/usr/libexec/bacula/create_mysql_database -u root
/usr/libexec/bacula/make_mysql_tables -u bacula

Now, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit. Start the interactive script by running:

sudo mysql_secure_installation

set the root password of your preferance & accept the default values to finish up.

We need to set the password for the Bacula database user.

Enter the MySQL console, as the root MySQL user:

mysql -u root -p

Add the following commands to set password & flush the privilege

UPDATE mysql.user SET Password=PASSWORD('bacula_unixcop') WHERE User='bacula';

Exit from the mariadb shell

Enable MariaDB to start on boot. Use the following command to do so:

sudo systemctl enable mariadb

By default, Bacula uses the PostgreSQL library. Because we are using MySQL, we need to set it to use the MySQL library instead.

Run this command:

sudo alternatives --config

You will see the following prompt. Enter 1 (MySQL):

with the above command, we will see if we have set the option properly.

With this, we have successfully installed the Bacula server (and client) components are now installed !


Please enter your comment!
Please enter your name here

Latest articles