Bareos (Backup Archiving Recovery Open Sourced) is a backup solution, its a fork of the better known Bacula. At work we use a commercial package called retrospect, it has proven itself in many situations, never the less, its good to look out what free and open-source alternatives are out there. Bareos caught my eye in particular, cause they seem very active in the FOSS community (see fosdem 2017), always a good sign.
Bareos has a huge documentation, sadly not everything is up-to-date or easy to understand for beginners like myself. The 500+ page manual is also not something you browse through quickly. That’s why I will post my guide(s) here, not cause the documentation is incomplete or perhaps not up-to-date. But to fellow sysadmin’s looking for a quick run at bareos without having to read through all the documentation. Like any open-source project, the more people who are involved the better the chance a project can survive on the long term.
Installation on Centos 7 is a blast. However due to the many moving parts, its good to keep your head in the game.
First start with adding the epel repository :
yum install epel-release
Follow by adding the official bareos repo : (you could also copy-paste this link)
wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/CentOS_7/bareos.repo
You are now ready to install the packages, I chose for mariadb as I am most familiar with it :
yum install bareos bareos-database-mysql bareos-webui mariadb-server
Next we need to setup mariadb and setup auto-login for root. Let’s start mariadb, and configure it to start at boot :
systemctl enable mariadb systemctl start mariadb
next run the mysql_secure_install script provided :
next create a file :
with content : (change PASSWORD)
[client] host=localhost user=root password=PASSWORD
Then we can install bareos schema using the provided MySQL scripts :
/usr/lib/bareos/scripts/create_bareos_database /usr/lib/bareos/scripts/make_bareos_tables /usr/lib/bareos/scripts/grant_bareos_privileges
This should result in something like :
[root@server ~]# /usr/lib/bareos/scripts/create_bareos_database Creating mysql database Creating of bareos database succeeded. [root@server ~]# /usr/lib/bareos/scripts/make_bareos_tables Making mysql tables Creation of Bareos MySQL tables succeeded. [root@server ~]# /usr/lib/bareos/scripts/grant_bareos_privileges Granting mysql tables Privileges for user bareos granted ON database bareos.
Now we are ready to start the services; since we installed the webui its good to start httpd as well, in case it was already running, reload/restart it.
systemctl start bareos-dir systemctl start bareos-sd systemctl start bareos-fd systemctl start httpd
The web-bareos-gui should already be available now under http://ip/bareos-webui/ the configuration for that can be found in
In my case, I had to let selinux security know that it could connect :
setsebool -P httpd_can_network_connect on
The web interface looks like :
What login you ask, ah, we have not yet created it so let’s go ahead and create a new user. Start the bareos-console :
configure add console name=admin password=password123 profile=webui-admin
And that’s it! After logging in on the web interface you will see something like :
Next we will add our first client and create a job for it to run on regular base.