Installing Bareos Webui
This chapter addresses the installation process of the Bareos WebUI.
Since Version >= 15.2.0 Bareos WebUI is part of the Bareos project and available for a number of platforms.
Features
Intuitive web interface
Multilingual
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)
System Requirements
A platform for which the bareos-webui package is available, see Bareos Packages
A working Bareos environment
Bareos Director version and Bareos WebUI version must match
The Bareos WebUI can be installed on any host. It does not have to be installed on the same as the Bareos Director.
The default installation uses PHP-FPM with Apache HTTP webserver having mod-rewrite and mod-fcgid enabled.
PHP 7 or newer is recommended.
On SUSE Linux Enterprise 12 you need the additional SUSE Linux Enterprise Module for Web Scripting 12.
Installation
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.
Install the bareos-webui package
After adding the repository simply install the bareos-webui package via your package manager.
RHEL, CentOS and Fedora
yum install bareos-webui
or
dnf install bareos-webui
SUSE Linux Enterprise Server (SLES), openSUSE
zypper install bareos-webui
Debian, Ubuntu
apt-get install bareos-webui
Minimal Configuration
This assumes, Bareos Director and Bareos WebUI are installed on the same host.
If you are using SELinux, allow HTTPD scripts and modules make network connections:
setsebool -P httpd_can_network_connect on
For details, see SELinux.
Restart Apache (to load configuration provided by bareos-webui, see Configure your Apache Webserver)
Use bconsole to create a user with name admin and password secret and permissions defined in
webui-admin (Dir->Profile)
:*reload reloaded *configure add console name=admin password=secret profile=webui-admin tlsenable=false
Of course, you can choose other names and passwords. For details, see Create a restricted consoles.
Login to http://HOSTNAME/bareos-webui with username and password as created.
Configuration Details
Create a restricted consoles
There is not need, that Bareos WebUI itself provide a user management. Instead it uses so named Console (Dir)
defined in the Bareos Director. You can have multiple consoles with different names and passwords, sort of like multiple users, each with different privileges.
At least one Console (Dir)
is required to use the Bareos WebUI.
To allow a user with name admin and password secret to access the Bareos Director with permissions defined in the webui-admin (Dir->Profile)
(see Configuration of profile resources), either
create a file
/etc/bareos/bareos-dir.d/console/admin.conf
with following content:To enable this, reload or restart your Bareos Director.
or use the bconsole:
*configure add console name=admin password=secret profile=webui-admin tlsenable=false
If the profile could not be found, reload or restart your Bareos Director.
TLS-PSK is not available between the Bareos WebUI and the Bareos Director. To enable TLS with certificates, see Bareos Webui.
For details, please read Console Resource.
Configuration of profile resources
The package bareos-webui comes with a predefined profile for Bareos WebUI: webui-admin (Dir->Profile)
.
If your Bareos WebUI is installed on another system than the Bareos Director, you have to copy the profile to the Bareos Director.
This is the default profile, giving access to all Bareos resources and allowing all commands used by the Bareos WebUI:
The Profile (Dir)
itself does not give any access to the Bareos Director, but can be used by Console (Dir)
, which do give access to the Bareos Director, see Create a restricted consoles.
For details, please read Access Control Configuration and Profile Resource.
SELinux
To use Bareos Director on a system with SELinux enabled, permission must be given to HTTPD to make network connections:
setsebool -P httpd_can_network_connect on
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
, /etc/apache2/available-conf/bareos-webui.conf
or similar.
The required Apache modules, fcgid and rewrite are enabled via package postinstall script. However, after installing the bareos-webui package, you need to restart your Apache webserver manually.
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:
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.
Configure your /etc/bareos-webui/configuration.ini
Since Version >= 16.2.2 you are able to configure some parameters of the Bareos WebUI to your needs.
Configure updating the Bvfs cache frequently
The restore module in the Bareos WebUI makes use of the Bvfs API and for example the .bvfs_update command to generate or update the Bvfs cache for jobs that are not already in the cache.
In case of larger backup jobs with lots of files that are not already in the cache, this could lead to timeouts while trying to load the filetree in the Bareos WebUI. That is why we highly recommend to update the Bvfs cache frequently.
This can be accomplished by the Run Script directive of a Job Resource.
The following code snippet is an example how to run the cache update process in a RunScript after the catalog backup.
Note
We do not provide a list of Jobs specified in the JobId command argument so the cache is computed for all jobs not already in the cache.
As an alternative to the method above the Bvfs cache can be updated after each job run by using the Run Script directive as well.
Note
We do provide a specific JobId in the JobId command argument in this example. Only the JobId given by the placeholder %i will be computed into the cache.
Upgrade from Bareos 21 or lower to Bareos 22
Bareos WebUI now requires php-fpm instead of Apache mod-php.
Usually this should be automatically handled by the packagemanager while updating.
Please consider the following remarks below according to your operating system of choice if auto upgrading does not work for you.
If the Bareos WebUI is not reachable after upgrading, make sure that:
Apache mod-php is disabled or has been removed
php-fpm* usage is configured properly in Apache
php-fpm service is enabled and has been restarted
Apache service has been restarted
Debian, Ubuntu, Univention
Please use apt instead of apt-get to upgrade automatically.
SUSE Linux Enterprise Server (SLES), openSUSE
Before upgrading
Disable or remove any PHP module in Apache2
After upgrading
Ensure a php.ini file is in place (e.g. /etc/php7/fpm/php.ini or /etc/php8/fpm/php.ini)
Configure PHP-FPM to your needs (e.g. /etc/php7/fpm/php-fpm.conf and /etc/php7/fpm/php-fpm.d/www.conf)
Configure mod_fcgid to your needs /etc/apache2/conf.d/mod_fcgid.conf
A minimal example may look like following.
Restart Apache2 and PHP-FPM
systemctl restart apache2 php-fpm
Console/Profile changes
The Bareos WebUI restore form now accepts a plugin options string in the restore form for plugin restores.
Therefore, the Bareos WebUI Director profile webui-admin (Dir->Profile)
has been extended by the directive Plugin Options ACL (Dir->Profile) = *all*
in Bareos Version >= 22.0.0.
To make use of that feature in Bareos WebUI, a proper configured Plugin Options ACL (Dir->Profile)
is required.
Upgrade from 18.2.6 to 18.2.7
Configuration changes
The configuration file configuration.ini
of the Bareos WebUI shipped with Bareos 18.2.7 introduced a new configuration
parameter called filetree_refresh_timeout
. The default value is 120 seconds if not set explicitly.
The Bareos WebUI triggers a Bvfs cache update automatically if required to be able to display the requested filetree. The configuration parameter has been introduced because in case of larger backup jobs with lots of files which are not already present in the Bvfs cache you could run into timeouts while trying to load the filetree in the restore module of the Bareos WebUI.
If you have trouble with running into timeouts while loading the tree you can adjust the parameter filetree_refresh_timeout
to your needs. Keep in mind to set the timeout in your Apache or Nginx configuration accordingly to the setting
in your configuration.ini
.
In general we highly recommend updating the Bvfs cache frequently. Please see Configure updating the Bvfs cache frequently for further details on how to accomplish this.
Upgrade from 15.2 to 16.2
Console/Profile changes
The Bareos WebUI Director profile shipped with Bareos 15.2 (webui (Dir->Profile)
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:
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 :bcommand:.bvfs_*` to .bvfs_.* in your
Command ACL (Dir->Profile)
to have a proper regular expression. Otherwise the restore module won’t work any longer, especially the file browser.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-admin (Dir->Profile)
allows all commands, except of the dangerous ones, see Configuration of profile resources.
directors.ini
Since Version >= 16.2.0 it is possible to work with different catalogs. Therefore the catalog parameter has been introduced. If you don’t set a catalog explicitly the default MyCatalog (Dir->Catalog)
will be used. Please see Configure your /etc/bareos-webui/directors.ini for more details.
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 Configure your /etc/bareos-webui/directors.ini for more details.
Additional information
NGINX
If you prefer to use Bareos WebUI on Nginx with php5-fpm instead of Apache, a basic working configuration could look like this:
This will make the Bareos WebUI accessible at http://bareos:9100/ (assuming your DNS resolve the hostname bareos to the NGINX server).
php.ini settings
The Bareos WebUI relies on date functions. Set the date.timezone directive according to the timezone of your Bareos Director.
[Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Europe/Berlin