Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


Bacula 7 server on CentOS 7

This page describes the installation of Bacula 7 on CentOS 7 using a MariaDB backend.

According to the change log, you can use the older file daemons from the standard repository: “Older File Daemons should be compatible with the 7.0.0 Director and Storage daemons. There should be no need to upgrade older File Daemons.”

Install CentOS 7

Install Bacula 7

  • Install development tools and preqrequisites:
    yum groupinstall "Development Tools"
    yum install ncurses-devel readline-devel qt qt-devel lzo-devel dejavu-*
    export PATH=/usr/lib64/qt4/bin/:$PATH
  • Install MariaDB:
    yum install mariadb-server mariadb-devel
  • Enable and start MariaDB:
    systemctl enable mariadb.service
    systemctl start mariadb.service
  • Set root password for MariaDB:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h <your fqdn> password 'new-password'
  • Create bacula users and groups, fd needs to run as root, so no group and user needed:
    groupadd -g 1999 bacula
    useradd -c "Bacula Director" -u 2000 -g 1999 -M -N -s /sbin/nologin bacula-dir
    useradd -c "Bacula Storage daemon" -u 2001 -g 1999 -M -N -s /sbin/nologin bacula-sd
  • Extract bacula-7.0.5.tar.gz
  • Run configure:
    CFLAGS="-g -O2 -Wall" \
    ./configure \
    --prefix=/opt/bacula \
    --with-scriptdir=/opt/bacula/scripts \
    --with-logdir=/opt/bacula/log \
    --mandir=/usr/local/share/man \
    --enable-smartalloc \
    --with-mysql \
    --with-dump-email=youremail@domain \
    --with-job-email=youremail@domain \
    --with-smtp-host=mail.server \
    --with-dir-user=bacula-dir \
    --with-dir-group=bacula \
    --with-sd-user=bacula-sd \
    --with-sd-group=bacula \
    --with-systemd \
    --enable-bat \
    --enable-lzo \
    --disable-conio \
    --enable-readline \
  • Complile Bacula:
  • Install as root:
    make install
  • It seemd the log dir was not created, so create it manually:
    mkdir /opt/bacula/log
    chmod g+w /opt/bacula/log
  • Change group rights:
    chgrp -R bacula /opt/bacula
  • Create database:
    /opt/bacula/scripts/create_bacula_database -u root -p
  • Create database tables:
    /opt/bacula/scripts/make_bacula_tables -u root -p
  • Grand privileges:
    /opt/bacula/scripts/grant_bacula_privileges -u root -p
  • Open firewall ports for director and storage daemon access.

Configure Bacula for disk based backup

Start Bacula

  • Manual start of Bacula:
    /opt/bacula/sbin/bacula start
bacula7_centos7.txt · Last modified: 2021/10/09 15:14 by