Bareos

Bareos
(
B
ackup
A
rchiving
Re
covery
O
pen
S
ourced) is a backup software, originally forked from the Bacula project. It is network-based, multi-client and very flexible with an architecture oriented towards scalability. Thus the learning curve might be considered somewhat steep. The project is backed by the commercial company Bareos GmbH & Co. KG, based in Germany.
The open-source project site is located at
https://www.bareos.com/
, the source code is hosted on Github
https://github.com/bareos/
Installation
There is
a group of packages in AUR
that will install the software, but there is some minor manual labour necessary to make it run. It is recommended to use Bareos with
PostgreSQL
, since use with
MariaDB
/MySQL was deprecated with version 19.0.
Install
the requirements first:
apache
Apache Webserver
php-apache
Apache PHP module
postgresql
PostgreSQL Database
php-pgsql
PostgreSQL module for PHP
It is recommended to install the following packages for a minimum working featureset, backing up to local storage with postgresql catalog support:
bareos-bconsole
AUR
bareos-common
AUR
bareos-database-common
AUR
bareos-database-postgresql
AUR
bareos-director
AUR
bareos-filedaemon
AUR
bareos-storage
AUR
Additionally, install these packages for a management webapp:
bareos-webui
AUR
bareos-webui-nginx
AUR
(if you would rather use nginx instead of apache)
Configuration
Pre-Configuration
Minimal configuration for
Apache HTTP Server
and
PHP
:
Follow the steps described in
Apache HTTP Server#Using libphp
You will also need to enable the
rewrite
module, to do this, modify
/etc/httpd/conf/httpd.conf
and uncomment:
LoadModule rewrite_module modules/mod_rewrite.so
If you are using a standard configuration file, change the following lines to the following:
#LoadModule mpm_event_module modules/mod_mpm_event.so 
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# bareos-webui
Include conf/extra/bareos-webui.conf
LoadModule php_module modules/libphp.so
Include conf/extra/php_module.conf
To use PHP7 you need to make the following fixes:
LoadModule php7_module modules/libphp7.so
Include conf/extra/php7_module.conf
Then enable the
postgresql
extension in PHP as listed in
PHP#PostgreSQL
And enable the
gettext
extension in PHP
Fixes in /etc/php7/php.ini or /etc/php7/php.ini:
open_basedir = /tmp/:/usr/share/bareos-webui/:/etc/bareos-webui: 
extension=gettext
extension=pgsql
Minimal configuration for
PostgreSQL
Initialize the database by following
PostgreSQL#Initial configuration
Start/enable
httpd.service
and
postgresql.service
.
Initial setup
These steps mostly follow the
Instructions
from docs.bareos.org, and include some Arch-specifics.
Setup the Bareos database
$ /usr/lib/bareos/scripts/create_bareos_database 
$ /usr/lib/bareos/scripts/make_bareos_tables
$ /usr/lib/bareos/scripts/grant_bareos_privileges
Copy default configuration files to the
/etc/bareos/
directory
# cp -r /usr/share/bareos/config/* /etc/bareos/
# chown -R bareos:bareos /etc/bareos
In versions prior to v21: Set the correct DB driver in the catalog configuration file
/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
dbdriver = "postgresql"
Note
As of v21 the MySQL driver has been deprecated and the
dbdriver
keyword cannot be specified.
Now
enable/start
bareos-dir.service
,
bareos-sd.service
and
bareos-fd.service
Configure Web-UI
Note
Currently (as of 2026-01-20) the AUR package is missing a few files and you will have to download the
webui-admin
profile yourself from the source: Place
this
file as
/etc/bareos/bareos-dir.d/profile/webui-admin.conf
.
Add a user for the webui
to start the interactive management shell, run:
$ bconsole
inside the shell, you get a
*
as prompt, where you can enter the following commands:
*reload
*configure add console name=admin password=
password
profile=webui-admin tlsenable=false
*quit
Warning
The password you specify here will be saved in a plain text configuration file as
/etc/bareos/bareos-dir.d/console/{username}.conf
.
Setup Apache
we need to fix a path in two lines:
/etc/httpd/conf.d/extra/bareos-webui.conf
Alias /bareos-webui  /usr/share/
webapps/
bareos-webui/
public
# ...
<Directory /usr/share/
webapps/
bareos-webui/
public
>
in the file
/etc/httpd/conf/httpd.conf
add the line:
Include conf.d/extra/bareos-webui.conf
restart
Apache
httpd.service
Now you can now login to Bareos Webui at
http://localhost/bareos-webui/
and login using the account you just created with
bconsole
.