Installing Bacula and Webacula on Fedora| Part 1

Bacula is one of the most widely used enterprise backup solutions for Linux, allowing systems administrators to automate backups using an array of tools. Bacula bacula-logoallows administrators to backup files from multiple clients to several different types of storage devices, including tape, raid, removable storage and networked storage. Webacula is a web application which allows you to monitor and control your Bacula jobs from a browser.

Before we begin you will need to make sure that you have Apache, PHP and MySQL installed in order to use the Webacula web interface. Ensure that you have the Apache and MySQL services running and that you have your username and password setup for the root user by using the following commands.

service httpd start
service mysqld start
mysqladmin –u root password “yourpassword”
chkconfig mysqld on

You can test if your privileges are working by using

mysqld –u root -p

Next install the following Bacula and Webacula packages using yum

yum –y install bacula-storage bacula-storage-mysql bacula-docs bacula-director-mysql bacula-console-gnome bacula-console bacula-client
 bacula-traymonitor webacula

Once you have all the packages installed, you will now need to browse to the installation directory.

Cd /usr/libexec/bacula

Using your MySQL username and password which you setup earlier you will now need to run the following shell scripts. As the names suggest these shell scripts are using your MySQL privileges to setup a new database, tables, and the username “webacula” for your database.

./grant_mysql_privileges -u root -p
./create_mysql_database -u root -p
./make_mysql_tables -u root -p
./grant_bacula_privileges -u root -p

Next you will need to browse to your /etc/bacula directory and modify all the addresses to localhost and passwords in the configuration files to something you will remember. You should also modify bacula-sd.conf Device {} section to contain the directory you want to save your backups to (by default it will backup to /tmp).

Next you will need to start the Bacula services. If the service fails to start it is because you have not modified the password or address in the corresponding configuration file.

Service bacula-dir start
Service bacula-fd start
Service bacula-sd start

Now that you have bacula running, you will need to browse to the /usr/share/webacula directory to configure webacula.

cd /usr/share/webacula/install

You will need to check if you have all the requirements first by using the php file supplied.


If you are using MySQL you will not need the Postgre requirements. Apart from that, if you have all the requirements you can continue configuring Webacula using the following commands:

./ -u root –p
./ -u root –p

Webacula will create a new username and password for accessing the database in the file, which you should ideally change. The default username and password set for MySQL is:

Username: wbuser

Password: wbpass

You will need to modify the /usr/share/webacula/application/config.ini file if you decide to change this password. You will also need to modify bacula.bconsole in this file to point to /usr/sbin/bconsole instead of /sbin/bconsole.

Now that you have modified the configuration file for webacula, it’s time to test if the installation was successful by visiting http://localhost/webacula from your local machine. If you are able to browse to the page without any errors then your installation was successful and you can move onto the next section.

If your page comes up with the error:

ERROR: There was a problem executing bconsole. See below. 
ERROR Command:
/usr/bin/sudo /usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf


You can fix this by modifying bacula.sudo = “/usr/bin/sudo”to bacula.sudo = “” and modifying the /etc/bacula/bconsole.conf to run as the apache user with the following command.

chown apache /etc/bacula/bconsole.conf



Read also : Bacula and webacula usage Part 2.

{module user9-footer}