Getting Started

Make directory tree

Login as root and make directory /var/www/webacula (for example). Copy Webacula distribution to this directory.

Download minimal Zend Framework package and extract. Copy the contents from directory
ZendFramework-*-minimal/library/Zend
to
webacula/library/Zend

NOTE. If you use the Zend Framework for multiple sites, then you can place it in a folder that is part of your PHP include path. By doing this, you will have access to the Zend Framework components in all PHP scripts.

The tree which should turn out as a result :

PHP session is stored in the table webacula_php_session.

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 files 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.

config.ini

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

Setting up to run bconsole under Webacula

Create system group account (if not yet created) :
groupadd bacula

Add apache to group:
usermod -aG bacula apache

IMPORTANT. Check /opt/bacula/sbin/bconsole it should be the binary ELF file, not a shell script!

Next, setup bconsole can be executed under Apache webserver.

Without using sudo

Edit application/config.ini

With sudo

Edit application/config.ini

Run visudo and changes

Check out the run bconsole :

Apache

Configuration for Apache see in install/apache/webacula.conf file.

NOTE. Specific directories on your system may be different.

Next, restart your Webserver.

mod_rewrite

Setup mod_rewrite see html/.htaccess. Edit RewriteBase parameter if necessary.

NOTE. Specific directories on your system may be different.

Check mod_rewrite installed :

For testing mod_rewrite change RewriteBase parameter, if necessary, in webacula/html/test_mod_rewrite/.htaccess file.

And use URL like http://localhost/webacula/test_mod_rewrite/ for test mod_rewrite.

PHP

Increase values in /etc/php.ini :

Bacula setup

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

and restart Bacula Director.

See also manual of Bacula «Chapter 15. Messages Resource».

Webacula install

If necessary change settings in install/db.conf file.

IMPORTANT. Change passwords in a file install/db.conf. Use password-to-hash.php <password> and insert the resulting hash as webacula_root_pwd.

Next create Webacula tables, Webacula built-in roles and Webacula built-in users.

For MySQL:

For PostgreSQL:

For Sqlite:

And further run scripts for your DBMS is running on localhost:

If your DBMS is running on a remote host, specify the appropriate option on the command line, for example, MySQL:

Change file html/.htaccess :

After that, you can login under the superuser root and the password which specified in a file install/db.conf in parameter webacula_root_pwd.

Webacula setup

Webacula and Bacula ACLs

Bacula ACLs — Bacula Console Access Control List — it is necessary to understand as it is described in the original documentation in section »Bacula Main Reference», »Configuring the Director», »The Console Resource».

In Webacula are implemented following Bacula ACLs :

  • JobACL
  • ClientACL
  • StorageACL
  • PoolACL
  • FileSetACL
  • WhereACL

Special keyword *all* when is present, any resource or command name will be accepted.

Webacula ACLs — it as a matter of fact access to certain menu items of Webacula.

Webacula ACLs

Webacula ACLs

If the user (more precisely — a role) does not have any a ACL rule, that user has no rights.

ACL rules are applied in the order which is defined by field value »order».

Bacula and Webacula ACLs can conflict. For example, usage of a Bacula command status is allowed to the user, but access to Webacula menu item Director at the same time is forbidden.

In this case the user sees the message like :

And on the contrary. Access to Webacula menu item Director can be allowed. And usage of a Bacula command status can be forbidden.

In this case the user sees the message like :

NOTE. Pay attention that in the first case access has been forbidden by a Webacula ACL rule, and in the second a Bacula ACL rule.

Users and roles

In Webacula the concept of users and roles is used. Each user has the role. There is no user without a role.

In other words you should create a role at first, and then create the user and assign to it a certain role.

The role can inherit from other role.

After install, Webacula has two built in roles :

  • root_role — default built-in superuser role.
  • operator_role — typical built-in role for backup operator.

Users who have the role root_role is assigned are superusers, they have all rights to all. This role cannot be deleted and the role name cannot be changed.

After installation root_role is assigned to the user with a login name root.

The role operator_role can fulfill any operations except of the administarators functions : creation, change, assignment of roles, users.

  • Sam

    I keep getting the following error message:

    ERROR
    Command:
    /sbin/bconsole
    output:
    05-Oct 18:58 bconsole: ERROR TERMINATION at parse_conf.c:907
    Config error: Cannot open config file «/etc/bacula/bconsole.conf»: Permission denied

    • kUser

      Hello!
      I have same problem.
      Any steps to fix it?

  • tim4dev

    Recheck System Requirements:
    PHP 5.3.2 or later with PDO extension active
    Zend Framework version from 1.10.0 to 1.12.3

    • philhu

      I did, system requirements are met, php 5.4, zf1 1.12.7 or 1.12.9, neither fixes problem. I AM running Centos 7, *NOT* 6

      • tim4dev

        Try :
        — clear ‘/data/cache’ directory
        — clear DB table ‘webacula_php_session’.
        — And clear cookies in browser.

        • philhu

          cleared data in data/cache under /usr/share/webacula/data/cache
          Cleared table, 470 rows deleted
          Cleared all cookies.

          Same thing, same problem.

      • philhu

        Ok, php is 5.4.16, Zend-Framework is now 1.12.3-minimal, pdo is running, same non-object errors.

        • Georgi Vasilev

          I have the same problem with centos 7.