Bareos
Bareos (Backup Archiving Recovery Open Sourced) 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
- php7-apache Apache PHP module
- postgresql PostgreSQL Database
- php7-pgsql PostgreSQL module for PHP
Install the packages from Arch User Repository:
- bareos-bconsoleAUR
- bareos-commonAUR
- bareos-database-commonAUR
- bareos-database-postgresqlAUR
- bareos-toolsAUR
- bareos-directorAUR
- bareos-filedaemonAUR
- bareos-storageAUR
- bareos-toolsAUR
- bareos-webuiAUR
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
To use PHP7, you also need to make the following fixes:
# PHP7 #LoadModule mpm_event_module modules/mod_mpm_event.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so LoadModule php7_module modules/libphp7.so Include conf/extra/php7_module.conf # bareos-webui Include conf/extra/bareos-webui.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:
open_basedir = /usr/share/bareos-webui/:/etc/bareos-webui/ extension=gettext extension=pgsql
Minimal configuration for PostgreSQL
- Initialize the database by following PostgreSQL#Initial configuration
Make sure both httpd.service
and postgresql.service
are enabled and started
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
- Set the correct DB driver in the catalog configuration file
/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
dbdriver = "postgresql"
- Now enable/start
bareos-dir.service
,bareos-sd.service
andbareos-fd.service
Configure Web-UI
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 (replacesecret
with an actual password):
*reload *configure add console name=admin password=secret profile=webui-admin tlsenable=false *quit
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
.