1.4. Installing Bareos Webui

This chapter addresses the installation process of the Bareos Webui.

Since 15.2.0 Bareos Webui is part of the Bareos project and available for a number of platforms.

image

1.4.1. Features

  • Intuitive web interface
  • Multilinugual
  • Can access multiple directors and catalogs
  • Individual accounts and ACL support via Bareos restricted named consoles
  • Tape Autochanger management, with the possibility to label, import/export media and update your autochanger slot status
  • Temporarly enable or disable jobs, clients and schedules and also see their current state
  • Show
    • Detailed information about Jobs, Clients, Filesets, Pools, Volumes, Storages, Schedules, Logs and Director messages
    • Filedaemon, Storage- and Director updates
    • Client, Director, Storage and Scheduler status
  • Backup Jobs
    • Start, cancel, rerun and restore from.
    • Show the file list of backup jobs
  • Restore files by browsing through a filetree of your backup jobs.
    • Merge your backup jobs history and filesets of a client or use a single backup job for restore.
    • Restore files to a different client instead of the origin
  • bconsole interface (limited to non-interactive commands)

1.4.2. System Requirements

  • A platform, for which the bareos-webui package is available, see Bareos Packages.
  • A working Bareos environment.
  • Bareos Director Daemon version Bareos Webui version.
  • The Bareos Webui can be installed on any host. It does not have to be installed on the same as the Bareos Director Daemon.
  • The default installation uses an Apache webserver with mod-rewrite, mod-php and mod-setenv.
  • PHP = 5.3.23
  • On SUSE Linux Enterprise 12 you need the additional SUSE Linux Enterprise Module for Web Scripting 12.

1.4.2.1. Version 16.2

Bareos Webui 16.2.4 incorporates the required Zend Framework 2 components, no extra Zend Framework installation is required. For older versions of bareos-webui, you must install Zend Framework separately. Unfortunately, not all distributions offer Zend Framework 2 packages. The following list shows where to get the Zend Framework 2 package:

Also be aware, that older versions of Bareos Director Daemon do not support the Subdirectory Configuration Scheme and therefore Bareos configuration resource files must be included manually.

1.4.3. Installation

1.4.3.1. Adding the Bareos Repository

If not already done, add the Bareos repository that is matching your Linux distribution. Please have a look at the chapter Install the Bareos Software Packages for more information on how to achieve this.

1.4.3.2. Install the bareos-webui package

After adding the repository simply install the bareos-webui package via your package manager.

  • RHEL, CentOS and Fedora
  • SUSE Linux Enterprise Server (SLES), openSUSE
  • Debian, Ubuntu

1.4.3.3. Minimal Configuration

This assumes, Bareos Director Daemon and Bareos Webui are installed on the same host.

  1. If you are using SELinux, allow HTTPD scripts and modules make network connections:
  1. Restart Apache (to load configuration provided by bareos-webui, see section-webui-apache)
  1. Login to http://HOSTNAME/bareos-webui with username and password as created in item-webui-create-user.

1.4.3.4. Configuration Details

1.4.3.4.1. Create a restricted consoles

There is not need, that Bareos Webui itself provide a user management. Instead it uses so named Dir Console defined in the Bareos Director Daemon. You can have multiple consoles with different names and passwords, sort of like multiple users, each with different privileges.

At least one Dir Console is required to use the Bareos Webui.

To allow a user with name admin and password secret to access the Bareos Director Daemon with permissions defined in the webui-adminDirProfile (see Configuration of profile resources), either

  • create a file /etc/bareos/bareos-dir.d/console/admin.conf with following content:
  • or use the bconsole:
add console
   *configure add console name=admin password=secret profile=webui-admin

For details, please read Console Resource.

1.4.3.4.2. Configuration of profile resources

The package bareos-webui comes with a predefined profile for Bareos Webui: webui-adminDirProfile .

If your Bareos Webui is installed on another system than the Bareos Director Daemon, you have to copy the profile to the Bareos Director Daemon.

This is the default profile, giving access to all Bareos resources and allowing all commands used by the Bareos Webui:

bareos-dir profile webui-admin
Profile {
  Name = webui-admin
  CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all*
  Job ACL = *all*
  Schedule ACL = *all*
  Catalog ACL = *all*
  Pool ACL = *all*
  Storage ACL = *all*
  Client ACL = *all*
  FileSet ACL = *all*
  Where ACL = *all*
  Plugin Options ACL = *all*
}

The Dir Profile itself does not give any access to the Bareos Director Daemon, but can be used by Dir Console, which do give access to the Bareos Director Daemon, see Create a restricted consoles.

For details, please read Profile Resource.

1.4.3.4.3. SELinux

To use Bareos Director Daemon on a system with SELinux enabled, permission must be given to HTTPD to make network connections:

1.4.3.4.4. Configure your Apache Webserver

The package bareos-webui provides a default configuration for Apache. Depending on your distribution, it is installed at /etc/apache2/conf.d/bareos-webui.conf, /etc/httpd/conf.d/bareos-webui.conf or /etc/apache2/available-conf/bareos-webui.conf.

The required Apache modules, setenv, rewrite and php are enabled via package postinstall script. However, after installing the bareos-webui package, you need to restart your Apache webserver manually.

1.4.3.4.5. Configure your /etc/bareos-webui/directors.ini

Configure your directors in /etc/bareos-webui/directors.ini to match your settings.

The configuration file /etc/bareos-webui/directors.ini should look similar to this:

/etc/bareos-webui/directors.ini
;
; Bareos WebUI Configuration File
;
; File: /etc/bareos-webui/directors.ini
;

;------------------------------------------------------------------------------
; Section localhost-dir
;------------------------------------------------------------------------------
[localhost-dir]

; Enable or disable section. Possible values are "yes" or "no", the default is "yes".
enabled = "yes"

; Fill in the IP-Address or FQDN of you director.
diraddress = "localhost"

; Default value is 9101
dirport = 9101

; Set catalog to explicit value if you have multiple catalogs
;catalog = "MyCatalog"

; TLS verify peer
; Possible values: true or false
tls_verify_peer = false

; Server can do TLS
; Possible values: true or false
server_can_do_tls = false

; Server requires TLS
; Possible values: true or false
server_requires_tls = false

; Client can do TLS
; Possible values: true or false
client_can_do_tls = false

; Client requires TLS
; Possible value: true or false
client_requires_tls = false

; Path to the certificate authority file
; E.g. ca_file = "/etc/bareos-webui/tls/BareosCA.crt"
;ca_file = ""

; Path to the cert file which needs to contain the client certificate and the key in PEM encoding
; E.g. ca_file = "/etc/bareos-webui/tls/restricted-named-console.pem"
;cert_file = ""

; Passphrase needed to unlock the above cert file if set
;cert_file_passphrase = ""

; Allowed common names
; E.g. allowed_cns = "host1.example.com"
;allowed_cns = ""

;------------------------------------------------------------------------------
; Section another-host-dir
;------------------------------------------------------------------------------
[another-host-dir]
enabled = "no"
diraddress = "192.168.120.1"
dirport = 9101
;catalog = "MyCatalog"
;tls_verify_peer = false
;server_can_do_tls = false
;server_requires_tls = false
;client_can_do_tls = false
;client_requires_tls = false
;ca_file = ""
;cert_file = ""
;cert_file_passphrase = ""
;allowed_cns = ""

You can add as many directors as you want, also the same host with a different name and different catalog, if you have multiple catalogs.

1.4.3.4.6. Configure your /etc/bareos-webui/configuration.ini

Since 16.2.2 you are able to configure some parameters of the Bareos Webui to your needs.

/etc/bareos-webui/configuration.ini
;
; Bareos WebUI Configuration File
;
; File: /etc/bareos-webui/configuration.ini
;

;------------------------------------------------------------------------------
; SESSION SETTINGS
;------------------------------------------------------------------------------
;
[session]
; Default: 3600 seconds
timeout=3600

;------------------------------------------------------------------------------
; DASHBOARD SETTINGS
;------------------------------------------------------------------------------
[dashboard]
; Autorefresh Interval
; Default: 60000 milliseconds
autorefresh_interval=60000

;------------------------------------------------------------------------------
; TABLE SETTINGS
;------------------------------------------------------------------------------
[tables]
; Possible values for pagination
; Default: 10,25,50,100
pagination_values=10,25,50,100

; Default number of rows per page
; for possible values see pagination_values
; Default: 25
pagination_default_value=25

; State saving - restore table state on page reload.
; Default: false
save_previous_state=false

;------------------------------------------------------------------------------
; VARIOUS SETTINGS
;------------------------------------------------------------------------------
[autochanger]
; Pooltype for label to use as filter.
; Default: none
labelpooltype=scratch

1.4.4. Upgrade from 15.2 to 16.2

1.4.4.1. Console/Profile changes

The Bareos Webui Director profile shipped with Bareos 15.2 (webuiDirProfile in the file /etc/bareos/bareos-dir.d/webui-profiles.conf) is not sufficient to use the Bareos Webui 16.2. This has several reasons:

  1. The handling of Acl s is more strict in Bareos 16.2 than it has been in Bareos 15.2. Substring matching is no longer enabled, therefore you need to change .bvfs_* to .bvfs_.* in your Command ACLDirProfile to have a proper regular expression. Otherwise the restore module won’t work any longer, especially the file browser.
  2. The Bareos Webui 16.2 uses following additional commands:
    • .help
    • .schedule
    • .pools
    • import
    • export
    • update
    • release
    • enable
    • disable

If you used an unmodified /etc/bareos/bareos-dir.d/webui-profiles.conf file, the easiest way is to overwrite it with the new profile file /etc/bareos/bareos-dir.d/profile/webui-admin.conf. The new webui-adminDirProfile allows all commands, except of the dangerous ones, see Configuration of profile resources.

1.4.4.2. directors.ini

Since MyCatalog will be used. Please see section-webui-configuration-files for more details.

1.4.4.3. configuration.ini

Since 16.2 the Bareos Webui introduced an additional configuration file besides the directors.ini file named configuration.ini where you are able to adjust some parameters of the webui to your needs. Please see section-webui-configuration-files for more details.

1.4.5. Additional information

1.4.5.1. NGINX

If you prefer to use Bareos Webui on Nginx with php5-fpm instead of Apache, a basic working configuration could look like this:

bareos-webui on nginx
server {

        listen       9100;
        server_name  bareos;
        root         /var/www/bareos-webui/public;

        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ .php$ {

                include snippets/fastcgi-php.conf;

                # php5-cgi alone:
                # pass the PHP
                # scripts to FastCGI server
                # listening on 127.0.0.1:9000
                #fastcgi_pass 127.0.0.1:9000;

                # php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;

                # APPLICATION_ENV:  set to 'development' or 'production'
                #fastcgi_param APPLICATION_ENV development;
                fastcgi_param APPLICATION_ENV production;

        }

}

This will make the Bareos Webui accessible at http://bareos:9100/ (assuming your DNS resolve the hostname bareos to the NGINX server).