4 \chapter{Baculum WebGUI Tool}
7 This chapter presents the new Bacula web based interface that has been added to
8 the Bacula projects in version 7.0 and later.
10 \section{Base Features}
12 Baculum provides following base features:
15 \item Running Bacula jobs (backup, restore, verify...).
16 \item Monitoring Bacula services status.
17 \item Bacula console available via web interface.
18 \item Multi-users interface.
19 \item Support for customized and restricted consoles (Console ACL function).
20 \item Volumes management.
21 \item User friendly graphs and metrics.
22 \item Basic storage daemon operations (mount, umount, release actions).
23 \item Easy in use configuration and restore wizards.
24 \item Multiple Directors support.
25 \item Live AJAX based statuses.
28 \section{General Requirements}
30 Environment for Baculum installation should have following components installed:
33 \item Web Server - with mod\_rewrite module loaded. Baculum has been tested with
34 Apache, Nginx and Lighttpd web servers.
35 \item PHP 5.3 or higher with following modules installed:
37 \item PDO PHP support - depending on your catalog database: PDO PostgreSQL
38 or PDO MySQL. Note, in case using MySQL database there is required to use MySQL
39 native driver. It is php-mysqlnd for PHP, not php-mysql.
40 \item BCMath PHP module.
41 \item cURL PHP module.
42 \item MB String PHP module.
43 \item JSON PHP module.
45 \item Bconsole - configured Bacula text based console
46 \item Access to Bacula Catalog database (local or remote)
49 All above requirements are validated during Baculum start. If in installation
50 environment there occurs lack some from these components then you will be
51 informed about this fact.
53 In case installation from binary packages (deb, rpm) all requirements are
54 installed automatically as packages dependencies.
56 \section{Installation from rpm binary packages}
58 For rpm binary packages format there exist following packages:
61 \item baculum - main package with application files
62 \item baculum-selinux - SELinux policies module
63 \item baculum-httpd - Apache web server configuration files
64 \item baculum-lighttpd - Lighttpd web server configuration files
67 \subsection{Add rpm repository}
69 To add Baculum repository, first is required importing public key:
72 rpm --import http://bacula.org/downloads/baculum/baculum.pub
75 Once importing the key is done, next step is adding repository definition to
79 /etc/yum.repos.d/baculum.repo
82 For CentOS 7 the definition is:
86 name=Baculum CentOS repository
87 baseurl=http://bacula.org/downloads/baculum/centos
92 For Fedora 23 the definition is:
96 name=Baculum Fedora repository
97 baseurl=http://bacula.org/downloads/baculum/fedora
102 \subsection{Installation for Apache}
104 Example installation for access via Apache web server can look like below:
107 yum install baculum baculum-httpd
110 Start Baculum as application available through Apache web server:
113 service httpd restart
116 Access from web browser: \textbf{http://localhost:9095}
118 First time login: \textbf{admin}
120 First time password: \textbf{admin}
122 \subsection{Installation for Lighttpd}
124 Example installation on system with SELinux enabled access and access via
125 Lighttpd looks following:
128 yum install baculum baculum-selinux baculum-lighttpd
131 Please note that in case CentOS distribution the Lighttpd web server is
132 available in distribution packages after enabling EPEL repository.
134 Start Baculum as application available through Apache web server:
137 service baculum-lighttpd start
140 Access from web browser: \textbf{http://localhost:9095}
142 First time login: \textbf{admin}
144 First time password: \textbf{admin}
146 \subsection{Access to bconsole via sudo}
148 Baculum requires access to Bconsole. To configure Bconsole sudo access there
149 can use following entries in newly created Baculum sudoers.d file (usually in
150 path /etc/sudoers.d/baculum):
152 In case default Apache user:
155 Defaults:apache !requiretty
156 apache ALL= NOPASSWD: /usr/sbin/bconsole
159 In case default Lighttpd user:
162 Defaults:lighttpd !requiretty
163 lighttpd ALL= NOPASSWD: /usr/sbin/bconsole
166 \section{Installation from deb binary packages}
168 For deb binary packages format there exist following packages:
171 \item baculum - main package with application files
172 \item baculum-apache2 - Apache web server configuration files
173 \item baculum-lighttpd - Lighttpd web server configuration files
176 \subsection{Add deb repository}
178 To add Baculum repository, first is required importing public key:
181 wget -qO - http://bacula.org/downloads/baculum/baculum.pub | apt-key add -
184 Once importing the key is done, next step is adding repository definition to
188 /etc/apt/sources.list.d/baculum.list
191 For Debian 8 Jessie the definition is:
194 deb http://bacula.org/downloads/baculum/debian jessie main
195 deb-src http://bacula.org/downloads/baculum/debian jessie main
198 For Ubuntu 15.04 Vivid the definition is:
200 deb [ arch=amd64 ] http://bacula.org/downloads/baculum/ubuntu vivid main
201 deb-src http://bacula.org/downloads/baculum/ubuntu vivid main
204 For Ubuntu 15.10 Wily the definition is:
206 deb [ arch=amd64 ] http://bacula.org/downloads/baculum/ubuntu wily main
207 deb-src http://bacula.org/downloads/baculum/ubuntu wily main
210 After adding repository definition please refresh repository indexes:
215 \subsection{Installation for Apache}
217 Example installation for access via Apache web server by using apt packages
218 manager can look like below:
221 apt-get install baculum baculum-apache2
224 Next is needed enable mod\_rewrite module for Apache:
227 ln -s /etc/apache2/mods-available/rewrite.load \
228 /etc/apache2/mods-enabled/rewrite.load
231 and include Baculum VirtualHost definition into Apache configuration:
234 ln -s /etc/apache2/sites-available/baculum.conf \
235 /etc/apache2/sites-enabled/baculum.conf
238 Start Baculum as application available through Apache web server:
241 service apache2 restart
244 Access from web browser: \textbf{http://localhost:9095}
246 First time login: \textbf{admin}
248 First time password: \textbf{admin}
250 \subsection{Installation for Lighttpd}
252 Example installation with access via Lighttpd web server looks following:
255 apt-get install baculum baculum-lighttpd
258 Start Baculum as application available through Apache web server:
261 service baculum-lighttpd start
264 Access from web browser: \textbf{http://localhost:9095}
266 First time login: \textbf{admin}
268 First time password: \textbf{admin}
270 \subsection{Access to bconsole via sudo}
272 Baculum requires access to Bconsole. To configure Bconsole sudo access there
273 can use following entries in newly created Baculum sudoers.d file (usually in
274 path /etc/sudoers.d/baculum):
276 In case default user both for Apache and Lighttpd:
279 Defaults:www-data !requiretty
280 www-data ALL= NOPASSWD: /usr/sbin/bconsole
283 \section{Installation from source tar archive}
285 There is possible to install Baculum from source bacula-gui tar archive.
287 To prepare Baculum runtime files there can be used Makefile file.
288 To do this, after unpacking bacula-gui archive please go to Baculum main
295 Then please run (depending on used distribution):
297 For rpm-based distributions (example with /tmp/baculum-runtime destination directory):
300 make build DESTDIR=/tmp/baculum-runtime
303 For deb-based distributions (example with /tmp/baculum-runtime destination directory):
306 make build DESTDIR=/tmp/baculum-release SAMPLETYPE=deb-template \
307 HTTPDNAME=apache2 HTTPDSITECONF=sites-available
310 After execution above command, in path /tmp/baculum-runtime should already exist all
313 Base Baculum source files will be located in:
316 /tmp/baculum-runtime/usr/share/baculum/htdocs/
319 They are files that should be placed in web server's document root (or Virtual
320 Host document root) directory.
322 Please note that for language files (including English) are created symbolic
326 /usr/share/locale/en/LC_MESSAGES/baculum.mo
327 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/en/baculum.mo
329 /usr/share/locale/pl/LC_MESSAGES/baculum.mo
330 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/pl/baculum.mo
332 /usr/share/locale/pt/LC_MESSAGES/baculum.mo
333 => /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Lang/pt/baculum.mo
336 Please also update symbolic link to Baculum settings directory in following
340 /tmp/baculum-runtime/usr/share/baculum/htdocs/protected/Data
343 Rest of files are: web servers configuration files, systemd units, SELinux
344 policy module and others. Please select and copy appropriate files to your
345 system environment and edit their content if needed.
347 At the end there is required to set read/write privileges for web server user
348 to listed below directories and files:
352 ./baculum/protected/Data/
353 ./baculum/protected/Data/baculum.users
354 ./baculum/protected/runtime/
358 \section{Users and Restricted Consoles}
360 Baculum supports customized and restricted consoles for each logged in user.
362 General design allows to have one administrator and many users. For each
363 user there is possible to define own bconsole configuration file that will
364 allow the user to specific resources only.
366 Resources limitation is realized by Bacula Restricted Consoles functionality.
368 Before using customized and restricted consoles with Baculum please check
369 location for bconsole configuration files for each user. To do it, there
370 is need to run configuration wizard and then to go to "Console" wizard step
373 In "Console" wizard step there is field "Bconsole custom config file path".
374 In this field there is required to define location for restricted consoles.
375 In defined path exists keyword \textbf{\{user\}}. The keyword will be replaced
376 into currently logged in username.
378 For example, if there is logged user named "john", keyword \{user\} will be
379 replaced into "john".
383 "Bconsole custom config file path" is defined as:
386 /usr/local/bacula/etc/bconsole-{user}.conf
389 After login user "john" to Baculum webGUI, for each bconsole request will be
393 /usr/local/bacula/etc/bconsole-john.conf
396 It makes available to define some specific Console access (or restricted
397 access) for each Baculum user.
399 Note that users are possible to create from Baculum web interface but bconsole
400 configuration files are not. From this reason please prepare bconsole
401 configuration files for each regular (not administrator) user self and check
402 access by logging in to Baculum as the new user.
404 For proper Baculum working some Bconsole commands are necessary. They are
418 \item .bvfs\_versions
419 \item .bvfs\_get\_jobids
424 Example configuration of the Restricted Console can look like below:
428 Name = "BaculaRestrictedUser"
429 Password = "XXXXXXXXX"
430 CommandACL = run,show,.client,.jobs,.fileset,.pool,.storage,.jobs,.bvfs_update,
431 .bvfs_lsdirs,.bvfs_lsfiles,.bvfs_versions,.bvfs_get_jobids,.bvfs_restore,restore
434 JobACL = somejob1,userjob
437 FileSetACL = somejob1-fileset,userjobFileSet3
442 \section{Screenshots}
444 \includegraphics{baculum01.png}
446 \includegraphics{baculum02.png}
448 \includegraphics{baculum03.png}
450 \includegraphics{baculum04.png}
452 \includegraphics{baculum05.png}
454 \includegraphics{baculum06.png}