Subsections


Baculum WebGUI Tool

This chapter presents the new Bacula web based interface that has been added to the Bacula projects in version 7.0 and later.

Base Features

Baculum provides following base features:

General Requirements

Environment for Baculum installation should have following components installed:

All above requirements are validated during Baculum start. If in installation environment there occurs lack some from these components then you will be informed about this fact.

In case installation from binary packages (deb, rpm) all requirements are installed automatically as packages dependencies.

Installation from rpm binary packages

For rpm binary packages format there exist following packages:

Add rpm repository

To add Baculum repository, first is required importing public key:

rpm --import http://bacula.org/downloads/baculum/baculum.pub

Once importing the key is done, next step is adding repository definition to newly created file:

/etc/yum.repos.d/baculum.repo

For CentOS 7 the definition is:

[baculumrepo]
name=Baculum CentOS repository
baseurl=http://bacula.org/downloads/baculum/centos
gpgcheck=1
enabled=1

For Fedora 23 the definition is:

[baculumrepo]
name=Baculum Fedora repository
baseurl=http://bacula.org/downloads/baculum/fedora
gpgcheck=1
enabled=1

Installation for Apache

Example installation for access via Apache web server can look like below:

yum install baculum baculum-httpd

Start Baculum as application available through Apache web server:

service httpd restart

Access from web browser: http://localhost:9095

First time login: admin

First time password: admin

Installation for Lighttpd

Example installation on system with SELinux enabled access and access via Lighttpd looks following:

yum install baculum baculum-selinux baculum-lighttpd

Please note that in case CentOS distribution the Lighttpd web server is available in distribution packages after enabling EPEL repository.

Start Baculum as application available through Apache web server:

service baculum-lighttpd start

Access from web browser: http://localhost:9095

First time login: admin

First time password: admin

Access to bconsole via sudo

Baculum requires access to Bconsole. To configure Bconsole sudo access there can use following entries in newly created Baculum sudoers.d file (usually in path /etc/sudoers.d/baculum):

In case default Apache user:

Defaults:apache !requiretty
apache  ALL= NOPASSWD:  /usr/sbin/bconsole

In case default Lighttpd user:

Defaults:lighttpd !requiretty
lighttpd  ALL= NOPASSWD:  /usr/sbin/bconsole

Installation from deb binary packages

For deb binary packages format there exist following packages:

Add deb repository

To add Baculum repository, first is required importing public key:

wget -qO - http://bacula.org/downloads/baculum/baculum.pub | apt-key add -

Once importing the key is done, next step is adding repository definition to newly created file:

/etc/apt/sources.list.d/baculum.list

For Debian 8 Jessie the definition is:

deb http://bacula.org/downloads/baculum/debian jessie main
deb-src http://bacula.org/downloads/baculum/debian jessie main

For Ubuntu 15.04 Vivid the definition is:

deb [ arch=amd64 ] http://bacula.org/downloads/baculum/ubuntu vivid main
deb-src http://bacula.org/downloads/baculum/ubuntu vivid main

For Ubuntu 15.10 Wily the definition is:

deb [ arch=amd64 ] http://bacula.org/downloads/baculum/ubuntu wily main
deb-src http://bacula.org/downloads/baculum/ubuntu wily main

After adding repository definition please refresh repository indexes:

apt-get update

Installation for Apache

Example installation for access via Apache web server by using apt packages manager can look like below:

apt-get install baculum baculum-apache2

Next is needed enable mod_rewrite module for Apache:

ln -s /etc/apache2/mods-available/rewrite.load \
    /etc/apache2/mods-enabled/rewrite.load

and include Baculum VirtualHost definition into Apache configuration:

ln -s /etc/apache2/sites-available/baculum.conf \
    /etc/apache2/sites-enabled/baculum.conf

Start Baculum as application available through Apache web server:

service apache2 restart

Access from web browser: http://localhost:9095

First time login: admin

First time password: admin

Installation for Lighttpd

Example installation with access via Lighttpd web server looks following:

apt-get install baculum baculum-lighttpd

Start Baculum as application available through Apache web server:

service baculum-lighttpd start

Access from web browser: http://localhost:9095

First time login: admin

First time password: admin

Access to bconsole via sudo

Baculum requires access to Bconsole. To configure Bconsole sudo access there can use following entries in newly created Baculum sudoers.d file (usually in path /etc/sudoers.d/baculum):

In case default user both for Apache and Lighttpd:

Defaults:www-data !requiretty
www-data  ALL= NOPASSWD:  /usr/sbin/bconsole

Installation from source tar archive

There is possible to install Baculum from source bacula-gui tar archive.

To prepare Baculum runtime files there can be used Makefile file. To do this, after unpacking bacula-gui archive please go to Baculum main directory:

cd ./web/baculum/

Then please run (depending on used distribution):

For rpm-based distributions (example with /tmp/baculum-runtime destination directory):

make build DESTDIR=/tmp/baculum-runtime

For deb-based distributions (example with /tmp/baculum-runtime destination directory):

make build DESTDIR=/tmp/baculum-release SAMPLETYPE=deb-template \
HTTPDNAME=apache2 HTTPDSITECONF=sites-available

After execution above command, in path /tmp/baculum-runtime should already exist all runtime files.

Base Baculum source files will be located in:

/tmp/baculum-runtime/usr/share/baculum/htdocs/

They are files that should be placed in web server's document root (or Virtual Host document root) directory.

Please note that for language files (including English) are created symbolic links as below:

/usr/share/locale/en/LC_MESSAGES/baculum.mo
 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/en/baculum.mo

/usr/share/locale/pl/LC_MESSAGES/baculum.mo
 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/pl/baculum.mo

/usr/share/locale/pt/LC_MESSAGES/baculum.mo
 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/pt/baculum.mo

Please also update symbolic link to Baculum settings directory in following path:

/tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Data

Rest of files are: web servers configuration files, systemd units, SELinux policy module and others. Please select and copy appropriate files to your system environment and edit their content if needed.

At the end there is required to set read/write privileges for web server user to listed below directories and files:

./baculum/assets/
./baculum/protected/Data/
./baculum/protected/Data/baculum.users
./baculum/protected/runtime/

Users and Restricted Consoles

Baculum supports customized and restricted consoles for each logged in user.

General design allows to have one administrator and many users. For each user there is possible to define own bconsole configuration file that will allow the user to specific resources only.

Resources limitation is realized by Bacula Restricted Consoles functionality.

Before using customized and restricted consoles with Baculum please check location for bconsole configuration files for each user. To do it, there is need to run configuration wizard and then to go to "Console" wizard step (fourth step).

In "Console" wizard step there is field "Bconsole custom config file path". In this field there is required to define location for restricted consoles. In defined path exists keyword {user}. The keyword will be replaced into currently logged in username.

For example, if there is logged user named "john", keyword {user} will be replaced into "john".

Example:

"Bconsole custom config file path" is defined as:

/usr/local/bacula/etc/bconsole-{user}.conf

After login user "john" to Baculum webGUI, for each bconsole request will be used file:

/usr/local/bacula/etc/bconsole-john.conf

It makes available to define some specific Console access (or restricted access) for each Baculum user.

Note that users are possible to create from Baculum web interface but bconsole configuration files are not. From this reason please prepare bconsole configuration files for each regular (not administrator) user self and check access by logging in to Baculum as the new user.

For proper Baculum working some Bconsole commands are necessary. They are commands:

Example configuration of the Restricted Console can look like below:

Console {
    Name = "BaculaRestrictedUser"
    Password = "XXXXXXXXX"
    CommandACL = run,show,.client,.jobs,.fileset,.pool,.storage,.jobs,.bvfs_update,
.bvfs_lsdirs,.bvfs_lsfiles,.bvfs_versions,.bvfs_get_jobids,.bvfs_restore,restore
    CatalogACL = *all*
    ClientACL = user-fd
    JobACL = somejob1,userjob
    PoolACL = Full-Pool
    StorageACL = VTL
    FileSetACL = somejob1-fileset,userjobFileSet3
    WhereACL = *all*
}

Screenshots

Image baculum01

Image baculum02

Image baculum03

Image baculum04

Image baculum05

Image baculum06

Kern Sibbald 2016-07-18