Sunday Oct 04

Key Concepts


Webacula installation on Ubuntu

Webacula installation on Ubuntu

Attention: open in a new window. PDFPrintE-mail
AddThis Social Bookmark Button

bacula backup system for Ubuntu

Webacula installation for Ubuntu

Bacula is a backup program enabling you to backup, restore, and verify data across your network

Webacula is a Web interface for the Bacula backup system.

Webacula installation requirement 

  • Bacula binaries installed
  • Zend Framework version 1.10.0 or later
  • PHP 5.2.4 or later with PDO extension active.
  • Apache and mod rewrite. Or equivalent web-server, for example, nginx and ngx http rewrite module
  • Installed php-gd package
  • Installed for use the RSS feed
  • Browser compatibility: all jQuery UI plugins are tested for IE 6.0+, Firefox 3+, Safari 3.1+, Opera 9.6+, Google Chrome

Installation context 

  • Webacula version 5.5
  • Ubuntu Karmic Koala (this procedure is suited for Debian as well)


Webacula features

The basic features of the program :

  • Bacula and Webacula ACLs (Access Control Lists) implemented. ACLs stored in Bacula database in Webacula tables 
  • Full supported MySQL, PostgreSQL and Sqlite databases 
  • Run Job Restore all files or selected files from Job by JobId 
  • Restore the most recent backup for a client 
  • Restore backup for a client before a specified time 
  • Show Timeline for Jobs Mount, umount Storages 
  • Show Jobs which executed with errors Show a condition of your Volumes 
  • Show scheduled Jobs (at 24 hours forward) 
  • Show all running Jobs Show terminated Jobs (executed in last 24 hours) 
  • Search Jobs on several conditions Web (ajax) terminal to Bacula Console The detailed information on Pools, Volumes, Storages and Clients Logbook. Logbook - is simple electronic journal of backups. 
  • Records in logbook are insert, modify, delete manually by the operator. 
  • Records can contain links (usual web-links on which it is possible to click) to Bacula Jobs or links to other records of this logbook. In logbook insert records, for example, about Jobs, failures of the equipment, supernumerary situations, etc. 
  • RSS feed Multilingual support - standard gettext (*.mo) files. 
  • Currently supported languages: English, French, German, Italian, Portuguese Brazil, Russian, Spanish. For web designers : now very easy to create new skins Major version number of Webacula will match the version number of Bacula



Webacula directory treeMake the directory tree

Log as root and make the following directory /usr/share/webacula/. Copy Webacula distribution to this directory.

webacula directory create

sudo mkdir /usr/share/webacula/

The resulting tree should look like 

 |-- application
 | |-- controllers
 | |-- models
 | `-- views
 |-- data
 | |-- cache
 | |-- session
 | `-- tmp
 |-- docs
 |-- install
 |-- html
 |-- languages
 `-- library
 |-- MyClass
 `-- Zend (here is Zend Framework package)
 |-- Acl
 |-- Auth
 |-- Cache

Some directory description:

  • application/ All source code. Should be available to reading for the Web- server and no access through the client Web-browser. 
  • html/ Public code. Should be available to reading for the Web-server and for the client Web-browser. 
  • data/ IMPORTANT. This directory, subdirectory and les in it must NOT be available to access through the client Web-browser. 
  • data/cache/ Cache directory for Zend Cache. Should be available to writing the Web-server and no access through the client Web-browser. 
  • data/session/ Storage for PHP session. Should be available to writing the Web-server and no access through the client Web-browser. 5 
  • data/tmp/ This directory which will be saved the le, which contains a list of les to Job restore. This directory and les in it should be available to read from the Bacula Director and to writing from the Web-server. And no access through the client Web-browser.

Webacula configuration


Specify the parameters to connect to the Catalog database, timezone and other in application/config.ini

Find below my configuration for a MySQL database configuration

; config.ini
; Webacula 5.5
;; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE
db.adapter = PDO_MYSQL = localhost
db.config.username = root
db.config.password = 
db.config.dbname = bacula
;; see
def.timezone = "UTC"
;; if locale undefined, webacula use autodetect
;; avaliable locales : en, de, fr, pt_BR, ru, it, es
; locale = "en"
;; see INSTALL file for details
bacula.sudo = ""
bacula.bconsole = "/usr/bin/bconsole"
bacula.bconsolecmd = "-n -c /etc/bacula/bconsole.conf"

  1. Define PDF_MYSQL tu use MySql  in the db.adapter parameter. 
  2. Define your database password in db.config.password. 
  3. Remove the sudo command in bacula.sudo (not needed thanks to the configuration below) 
  4. Redefine the bconcole bin according to Ubuntu installation of bacula. bacula.bconsole parameter should be /usr/bin/bconsole instead of  /sbin/bconsole

Webacula security configuration

Create system group account (It should be already created) :
bacula group creation

sudo groupadd bacula

In order to make sure you have proper web access, you must also add the web user (www-data) to the bacula group.
Add apache to group: 
sudo usermod -aG bacula www-data


Execution rights

Setup bconsole can be executed under Apache webserver.
webacula user rights

chown root:bacula /usr/bin/bconsole 
chmod u=rwx,g=rx,o= /usr/bin/bconsole 
chown root:bacula /etc/bacula/bconsole.conf 
chmod u=rw,g=r,o= /etc/bacula/bconsole.conf 

Configure Zend-Framework

Install Zend using Synaptic of apt-get

Remove the preconfigured Zend folder :

webacula zend framework directory creation

sudo rmdir /usr/share/webacula/library/Zend 

Assuming your Zend framework library has been install in /usr/share/php/libzend-framework-php/ 

Create a symbolic link to the Zend-Framework :

webacula symbolic link

ln -s /usr/share/php/libzend-framework-php/Zend /usr/share/webacula/library/Zend

Webacula Apache configuration

Configure an alias. If you are using virtual hosts your webacula application will be accessible whatever the domain you are using. 

Apache configuration file : /etc/apache2/apache.conf

# Apache conf
# Webacula - Web interface of a Bacula backup system
# Allows only localhost by default

#LoadModule rewrite_module modules/
# AccessFileName .htaccess
# RewriteLog "/var/log/httpd/mod_rewrite.log"
# RewriteLogLevel 3
# SetEnv APPLICATION_ENV development
SetEnv APPLICATION_ENV production
Alias /webacula  /usr/share/webacula/html

   RewriteEngine On
   RewriteBase   /webacula
   RewriteCond %{REQUEST_FILENAME} -s [OR]
   RewriteCond %{REQUEST_FILENAME} -l [OR]
   RewriteCond %{REQUEST_FILENAME} -d
   RewriteRule ^.*$ - [NC,L]
   RewriteRule ^.*$ index.php [NC,L]
   php_flag magic_quotes_gpc off
   php_flag register_globals off
   Options Indexes FollowSymLinks
   AllowOverride All
   Order deny,allow
   Deny from all
   Allow from
   Allow from localhost
   Allow from ::1
   # change the settings below
   # Allow from

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all

   Order deny,allow
   Deny from all
# test mod_rewrite
   RewriteEngine On
   # for test mod_rewrite
   RewriteBase   /webacula/test_mod_rewrite
   RewriteRule ^testlink([^/]*).html$  index.php?testlink=$1 [L]
   php_flag magic_quotes_gpc off
   php_flag register_globals off
   Options Indexes FollowSymLinks
   AllowOverride All
   Order deny,allow
   Deny from all
   Allow from
   Allow from localhost
   Allow from ::1



  1. Define the alias name (Line 14)
  2. Put in comment the mod rewrite module if you have it already enabled (Line 8)
  3. Define the "Allow from" according to the ip addresses you will use to administer your backup system
  4. Edit RewriteBase parameter if necessary.

PHP Configuration


Increase values in /etc/php.ini :

 memory_limit = 32M
max_execution_time = 3600

Bacula setup

To show messages of the Job output, you must make changes in bacula-dir.conf le :

Messages { 
   Name = Standard 
   catalog = all, !skipped, !saved 

and restart Bacula Director.

Webacula database installationDatabase installation


cd install/MySql

webacula verificationTest your installation


 If you enjoyed this tutorial and want to promote it don't hesitate to click on 

Tags: bacula, client, directory, webacula, order, deny


0 #30 top music single 2014-11-27 01:20
Hello, I enjoy reading all of your article. I like to write a little comment to support
0 #29 making mobile 2014-11-02 10:11
Its like you read my mind! You appear to know a lot about this, like you wrote
the book in it or something. I think that you can do with a few
pics to drive the message home a little bit, but other than that, this is great blog.
A great read. I will certainly be back.
0 #28 Free Classifieds 2014-10-28 19:39
There is certainly a lot to know about this subject.

I like all the points you have made.
0 #27 download youtube 2014-02-18 17:49
This is my first time go to see at here and i am really happy to read
everthing at one place.

My web blog download youtube
video download youtube videos:
0 #26 uninstall google 2014-02-18 17:12
Hello there! I just would like to give you a huge thumbs up
for the excellent information you've got here on this post.
I'll be coming back to your web site for more soon.

my website :: uninstall
google chrome:
+2 #25 Azhar Khan 2014-01-07 09:57
I got this error when after login in webacula and when i click on Director tab same error appear. Kindly help

ERROR TERMINATION at parse_conf.c:918 Cannot open config file "/etc/bacula/bconsole.conf": Permission denied

bconsole.conf already has 777 permissions but still got this error.

Thanks in Advance
0 #24 jacek 2013-09-12 12:24

after install i get error:
Fatal error: Uncaught exception 'Zend_Db_Table_E xception' with message 'Primary key column(s) (id) are not columns in this table ()' in /usr/share/php/Zend/Db/Table/Abstract.php:900 Stack trace: #0 /usr/share/php/Zend/Session/SaveHandler/DbTable.php(519): Zend_Db_Table_A bstract->_setupPrimaryKe y() #1 /usr/share/php/Zend/Session/SaveHandler/DbTable.php(318): Zend_Session_Sa veHandler_DbTab le->_getPrimary('ktrj1157njnaim4...') #2 [internal function]: Zend_Session_Sa veHandler_DbTab le->read('ktrj1157njnaim4...') #3 /usr/share/php/Zend/Session.php(469): session_start() #4 /srv/www/webacula-5.5.1/html/index.php(215): Zend_Session::s tart() #5 {main} thrown in /usr/share/php/Zend/Db/Table/Abstract.php on line 900

debian 7.1 amd64, bacula from debian repo, webacula from sourceforge page.
0 #23 revslikehell 2013-07-23 03:24
well this error seems no one is able to solved.... damn fck

Quoting Pomardako:
Im login but i have this error :

Fatal error: Uncaught exception 'Zend_Exception' with message 'Fatal error: Can't connect to SQL server' in /var/www/webacula/html/index.php:178
Stack trace:
#0 {main}
thrown in /var/www/webacula/html/index.php on line 178
0 #22 aristotle ahito 2013-07-03 08:51
could please post some tutorial on how to install webacula on centos 6 using postgresql

0 #21 Leo 2013-03-26 13:15

Can you help me to solve this problem please ?

Warning: include_once(Ze nd/Db/Adapter/Pdf/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 146 Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdf/Mysql.php' for inclusion (include_path='.:/usr/share/webacula/html/../library:../application/models/:../application/forms/:.:/usr/share/php:/usr/share/pear') in /usr/share/php/Zend/Loader.php on line 146 Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Db/Adapter/Pdf/Mysql.php" does not exist or class "Zend_Db_Adapter _Pdf_Mysql" was not found in the file' in /usr/share/php/Zend/Loader.php:99 Stack trace: #0 /usr/share/php/Zend/Db.php(258): Zend_Loader::lo adClass('Zend_Db_Adapter ...') #1 /usr/share/webacula/html/index.php(113): Zend_Db::factor y('PDF_MYSQL', Array) #2 {main} thrown in /usr/share/php/Zend/Loader.php on line 99

Add comment

Security code

Java Tutorial on Facebook