🦇Bacula - Install Bacularis UI🦇#

801 words | 11 min read


In the previous article, we configured the the File Daemons on 2 client computers. We also configured the Bacula Director to backup these 2 clients, and successfully executed the backups.

All the work so far has been at the command line, or in configuration files. Now that we have working backups, let us install a Web based UI to make configuring, managing and monitoring the backups easier.

When it comes to UIs for Bacula, there are several options:

  • Bacula-Web: This is a PHP-based tool that allows you to check backup jobs, volumes, pools etc. but you cannot configure or make changes to anything.

  • Baculum: This UI for Bacula allows you to not only check jobs, volumes etc., but also to set up jobs and make configuration changes. As expected, the setup for this is more involved.

  • Bacularis: This is a friendly fork of Baculum, and is intended to make it easier to use for beginners and experts alike. It has several setup options (RPMs, DEBs, docker etc.) that can make it easier to configure and use.

In order to use all the features of Bacularis (or baculum) you need to install it on the same machine where the Director is. Bacularis needs access to

  • The Bacula Catalog

  • The Bacula Console

  • Web Server - We need to install a Webserver on server01 (Apache is the default for Bacularis)

The Bacularis Install Guide provides several methods to install Bacularis.

If there is a DEB or RPM available for your platform, it’s probably easier to install and use it. Dockser is also one of the options to install Bacularis.

However, in my case, I had to use the Composer method

1. Install and configure the Apache Web Server#

Install the Apache server on server01 along with mod-php.

Install the Apache Web Server#
sudo apt install -y apache2 libapache2-mod-php8.2

Note

The PHP version could be different for your distribution/version. Please be sure to substitute the appropriate version number

1.1. Enable mod_rewrite#

Enable mod_rewrite#
sudo a2enmod rewrite

Test the connection by opening a browser to server01.example.com

2. Install the Bacularis pre-requisites#

2.1. Install pre-requisite packages#

Next, run the following command This command is a slight modification from what’s on the Bacularis Website

Install the Bacularis Pre-requisites#
sudo apt install -y curl patch php-cli php-bcmath php-curl php-xml php-json php-ldap php-mysql php-pdo php-pgsql php-intl 7zip unzip

3. Install Composer for Bacularis#

Caution

Before running the installer, examine the file to ensure it’s not malicious code

Install Composer For Bacularis#
sudo mkdir -p /etc/bacularis
cd /etc/bacularis
sudo curl -o installer.php -s http://getcomposer.org/installer
sudo php installer.php
sudo ln -s composer.phar composer
sudo chown -R www-data:www-data /etc/bacularis
sudo mkdir -p /var/www/.cache/
sudo chown -R www-data:www-data /var/www/.cache/

4. Install Bacularis#

Note

Allow Plugins to be installed during the Bacularis installation

Install Bacularis#
sudo -u www-data bash -c "/etc/bacularis/composer create-project bacularis/bacularis-app"

4.1. Set Proper permissions for specific Bacularis Directories#

This step is documented on the Bacularis Website. The Bacularis installer will also remind you (in UPPERCASE).

Install Bacularis#
sudo /etc/bacularis/bacularis-app/protected/tools/install.sh

When the script runs, it will ask about your Webserver type. Since we’re using the Apache Webserver - the answer’s obvious.

The userID for our Webserver is also the default of “www-data”.

5. Configure Apache for Bacularis#

5.1. Copy bacularis configuration to Apache#

Enable mod_rewrite#
sudo cp /etc/bacularis/bacularis-app/bacularis-apache.conf /etc/apache2/sites-available/bacularis.conf
cd /etc/apache2/sites-enabled
sudo ln -s ../sites-available/bacularis.conf

5.2. Restart Apache#

Restart Apache#
sudo systemctl restart apache2

Test the connection by opening a browser to server01.example.com:9097

6. Configure Bacularis#

Open a Web Browser and go to ws01.example.com

Use the UserID “admin” and Password “admin” when logging in for the first time.

Select the language you want. Select both Services in the list (“Enable API instance” and “Enable Web interface”)

Hit “Next” to continue.

6.1 Configure the Bacula Catalog Settings in Bacularis#

Select the following values for each field:

  • Do you want to setup and to share the Bacula Catalog Database access for this API instance? = Yes

  • Database type = PostgreSQL

  • Database name = bacula

  • Login = bacula

  • Password = <YOUR_SUPER_SECRET_PASSWORD>

  • IP address (or hostname) = server01.example.com

  • Port = 5432

Test the connection. Once it’s “OK”, hit “Next” to Continue.

6.2. Configure Bacula Console Settings in Bacularis#

This will require “sudo” access. Make sure the “Use sudo” checkbox is selected. Click the “Get sudo configuration” link and follow the instructions to enable sudo access

Test the BConsole Connection on the Bacularis UI. Once it’s “OK”, Hit “Next”.

6.3. Setup the Bacula Configuration interface in Bacularis#

Note

Be sure to setup Sudo as specified in the popup after clicking “Get sudo configuration”

Choose the following values for each field

  • Get pre-defined paths = Binaries: /usr/sbin, Configs: /etc/bacula

  • Baculum working directory for Bacula config = Accept default

  • Use sudo = True (i.e. checkbox is selected)

  • Configure the sudo settings

  • Accept defaults for all other fields

Test the configuration. Once the test succeeds, Go to the next screen.

6.4. Set a new UserID/password for Bacularis#

Set a new userid and password for Bacularis. And then, on the next screeen, berify your settings and save.

6.5. Login to Bacularis#

Login to Bacularis with the userID and password you specified.

You should be able to see all the Bacula settings you configured so far, as well as the jobs and pools and volumes.

You can add/modify/delete any of the settings according to your requirements/preferences.

You can also see graphs and charts with various metrics to help you keep an eye on Bacula.

Note

There is a known issue with listing Bacula Job files for older Bacula versions.
If that is important for you, you can try bacula-web.

7. Next Steps#

  • You can set up Bacularis under Apache on a different port.

  • You can configure SSL for Apache.

  • You can also reverse proxy Bacularis behind NGINX or Traefik etc.

However, we will not be covering those steps at this point.