Install Bareos 18.2 and webui in Fedora 29 Server

Thanks to @jackson over at, with a couple of tweaks, I was able to install Bareos 18.2 on Fedora 28 Server.   Here is the original article:

You’re choice of a VM or bare metal machine.  I choose VMware ESXi with a tiny VM and 2 CPU, 8/16GB.

Machine name: BareosServer
All passwords: bareos

Install and Initialize mysql

Note: At the ‘Enter current password for root (enter for none):‘ prompt, hit Enter. Then enter a password and confirm. Answer ‘Y’ to all proceeding questions.

# dnf install -y mariadb-server 
# systemctl start mariadb 
# systemctl enable mariadb
# mysql_secure_installation 

Add the Bareos repository

name=bareos bareos-18.2 (Fedora_28)

# vi /etc/yum.repos.d/bareos.repo

Install Bareos

# dnf install -y bareos bareos-database-mysql 

Edit mysql config so root can run scripts

Note: Add the following to the end of my.cnf


# vi /etc/my.cnf 

Run scripts to create Bareos database, tables, & privileges

NOTE: On another installation, I had a problem running the scripts: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
The fix was to edit each script and credentials. Change: ‘mysql ‘ to ‘mysql -u root -pbareos is whatever follows mysql

# cd /usr/lib/bareos/scripts
# ./create_bareos_database
# ./make_bareos_tables 
# ./grant_bareos_privileges

Start Bareos processes

# systemctl start bareos-dir
# systemctl start bareos-sd
# systemctl start bareos-fd 

Verify process are listening

Note: Three entries should be present: 9101, 9102, 9103

# netstat -an | grep ":910"

Enable processes

# systemctl enable bareos-dir 
# systemctl enable bareos-sd 
# systemctl enable bareos-fd 

Enable the process for selinux

# setsebool -P httpd_can_network_connect on

Add exceptions to the firewall

# firewall-cmd --permanent --add-port=9101-9103/tcp 
# firewall-cmd --permanent --add-port=80/tcp 
# firewall-cmd --reload

Test Director

Note: quit to exit

# bconsole

Install Apache

# dnf install -y httpd php php-cli php-common
# dnf install -y bareos-webui

Enable Bareos console/web login

Note: Add the following to the bottom to the file. Type it. Copy & Paste inserts the wrong quotes.

Console {
  Name = root
  Password = “bareos”
  Profile = “webui-admin”

# vi /etc/bareos/bareos-dir.d/console/bareos-mon.conf

Backing up Windows Clients

The default Bareos config backups up LInux clients just fine.  You’ll need to create new: fileset/SelfTest.conf; fileset/Windows All Drives; job/backup*; job/RestoreFiles; jobdefs/DefaultJob;

Once I sanitize a working set, I’ll upload the package here.

Enable Statistics Collection

Add the following to Storage in bareos-sd.conf:

Storage {

  Collect Device Statistics = yes
  Collect Job Statistics = yes
  Statistics Collect Interval = 60

# vi /etc/bareos/bareos-sd.d/storage/bareos-sd.conf

Add the following to Device in FileStorage.conf:

Device {

  Collect Statistics = yes

# vi /etc/bareos/bareos-sd.d/device/FileStorage.conf

Restart Apache & Director

# systemctl enable httpd
# systemctl restart httpd
# systemctl restart bareos-dir

Lookup the IP address

# ifconfig

Add the IP address to the hosts file

Note: You’ll also need to enter your client addresses and names     BareosServer     client1     client2     client3     client4

# vi /etc/hosts

On each client machine

  • In the hosts file (Windows and Linux) add the client and BareosServer IP Addresses
  • Windows hosts: C:\Windows\System32\drivers\etc\hosts
  • Linux hosts: /etc/hosts
  • Install fd (File Director)
  • Open firewall ports 9102,9103

Open a web browser and navigate to:

Name: root
Password: bareos

Enable disk compression:

First, add modules to the kernel:

# modprobe lz4 lz4_compress

Second, create the file and add this line:

# echo 'add_drivers+="lz4 lz4_compress"' > /etc/dracut.conf.d/lz4.conf

Third, create a new ramdisk

# dracut --regenerate-all --force

If you have a system with low RAM, you may want to also enable zswap

# echo lz4 > /sys/module/zswap/parameters/compressor
# echo 20 > /sys/module/zswap/parameters/max_pool_percent
# echo 1 > /sys/module/zswap/parameters/enabled

Leave a Reply