Link with the Director
Network Access
The following ports should be accessible between the server that hosts
BWeb and other Bacula Enterprise components. All protocols can use
SSL
/TLS
or, for ssh
access, are encrypted anyway.
Component |
Source |
Destination |
Default port |
---|---|---|---|
SQL (PostgreSQL) |
BWeb |
Catalog |
5432/tcp |
SQL (MySQL) |
BWeb |
Catalog |
3306/tcp |
Command Link |
BWeb |
Director |
9101/tcp |
Command Link (optional) |
BWeb |
Storage |
22/tcp |
Admin Web Access |
Admin Workstation |
BWeb |
80,443/tcp |
SQL Catalog Access
[sec:dbi] BWeb uses the Perl DBI layer to query Bacula’s catalog.
You should configure the connection string in the bweb.conf
file or
in the web configuration panel (If your web server can modify the
configuration file).
There is no standard for the text following the driver name. Each driver is free to use whatever syntax it wants. You must consult the documentation for the drivers you are using for a description of the syntax they require.
For example, if your PostgreSQL catalog baculaprod
is accessible
through the network on 192.168.1.2
port 5432/tcp, you will use:
DBI:Pg:database=baculaprod;host=192.168.1.2;port=5432
For a local MySQL catalog baculaprod
, you will use:
DBI::mysql:database=baculaprod
Parameters |
Example |
Informations |
---|---|---|
|
|
Database name |
|
|
SQL server name |
|
|
Port of the connection to the server |
|
|
Use SSL for Postgres SQL connection |
|
|
Use SSL for MySQL SQL connection |
bconsole Configuration
BWeb communicates with the Director through bconsole
.
It requires that your web server has permission to execute the command
and read the associated configuration file bconsole.conf
. When using
Bacula Systems default configuration, the web server is running as
“bacula”, so everything should work out of the box.
When running BWeb through a custom apache configuration, the web server
is running as “www-data” or “apache”. It means that in this
configuration, Apache
will not allow to communicate with Bacula
without manual changes.
# cd /opt/bacula
# ls -l bin/bconsole etc/bconsole.conf
-rwxr-xr-x 1 root root 843227 2008-11-01 16:18 bin/bconsole
-rw-r----- 1 root bacula 171 2008-11-04 18:48 etc/bconsole.conf
If you don’t want to give this kind of permission, you can add the web
server user to the bacula
group or use a copy of the
bconsole.conf
file with restricted permissions.
# cp /opt/bacula/etc/bconsole.conf /opt/bacula/etc/bconsole-web.conf
# ls -l etc/bconsole.conf etc/bconsole-web.conf
-rw-rw---- 1 root bacula 171 2008-11-04 18:48 etc/bconsole.conf
-rw-r----- 1 root www-data 171 2008-11-04 18:48 etc/bconsole-web.conf
Note that we provide configuration files to run Apache
or
Lighttpd
with the bacula
Unix user. So, if the bacula
user
can read configuration files and execute binaries, BWeb should read them
too.
Director Configuration
To be able to see Job logs in BWeb, you must add the catalog as a destination in all Messages resources. See the “catalog =” line below:
Messages {
Name = Standard
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/opt/bacula/working/log" = all, !skipped
catalog = all, !skipped, !saved
}
Go back to Installation with Packages chapter.