Thursday, May 19, 2016

How to install the Bareos Web UI

A bit of a background

Since Bareos is a descendant of the Bacula backup system, there are several ways to administer the system. There is a console-based bconsole, a character menu-driven system. For a GUI experience there is BAT (Bacula Admin Tool), which provides most of the features of bconsole. If you are using Webmin, there is Bacula Backup module which provides basic configuration and administration. A dedicated web interface was eventually developed, called Bacula-Web. However it is more of a monitoring tool than anything else. What drove a wedge between long time bacula users and the Bacula project is the web administration tool, which is available for the commercial version of Bacula but not the open source version. Other efforts at building a web administration tool have faltered with projects like Web-Bacula stalled and abandoned.
Bareos was committed from the get-go to a web administration tool. As more and more features were added, the Bareos WebUI finally moved out from a monitoring tool to an administration tool. However, it still does not support changing the Bareos configuration. The WebUI works through the Bareos Director to execute it's operation. Installing the WebUI can be done in three stages, installing configuring and finalising the setup.

Installing the Bareos WebUI

If you have followed the Bareos server setup post, the Bareos and EPEL repository should be already be set up. Installing it is very easy.

yum install bareos-webui

That will install the WebUI and the ZendFramework it runs on, plus it's dependencies. The process may take sometime as it installs over 100 packages automatically.

Configuring the Bareos WebUI

Configuration for the Bareos WebUI is tied closely to the Director. Most Bareos setups have one installation and one Bareos Director. However, the Bareos WebUI can support multiple directors, allowing for organisations using Bareos Backup to have multiple setups that are heavily customised for the purpose of the backup and backup strategy.
Again, the Bareos developers have provided an easy way to do this. Run the following commands as a privileged user or root user to add the WebUI configuration to a Director setup.

echo "@/etc/bareos/bareos-dir.d/webui-consoles.conf" >> /etc/bareos/bareos-dir.conf 
echo "@/etc/bareos/bareos-dir.d/webui-profiles.conf" >> /etc/bareos/bareos-dir.conf
 
The two commands add a line to the Director configuration. The top line is for the WebUI console configuration file. The file contains critical information such as the name of the profile, the username and password used to access the profile. This is the username and password used to log into Bareos WebUI. The default username is user1 and password is CHANGME. The bottom line is for the profile configuration. The configuration defines what the profile, and therefore the user, can do. The default profile name is webui and the default file allows full access. Restart the Bareos Director to load the new configuration.

service bareos-dir restart

If the server is a fresh installation, start the apache webserver and configure the firewall to allow connection to port 80.  The Bareos WebUI installation will setup the apache configuration in /etc/httpd/conf.d/bareos-webui.conf. Point your browser to the URL http://<Ip address of server>/bareos-webui and log in.
Once the Dashboard is shown, run a the sample job by going to Jobs, and the Run tab. Find the BackupClient1 line. Under the Action column, click the Run button. To check whether the job completed successfully, go back to the Dashboard or the Overview tab under Jobs.

Finalizing the setup

To complete the setup, make sure the apache server is set to start at book.

chckconfig httpd on

Make sure the firewall configuration is also saved.

2 comments:

  1. Thanks for the pointers! I actually installed on FreeBSD but some info here pointed me in the right direction :)

    ReplyDelete