Debian Codegraph @

manuals/en/console/baculum.tex

raw
1 %%
2 %%
3
4 \chapter{Baculum API and Web GUI Tools}
5 \label{BaculumChapter}
6
7 This chapter presents the Bacula Web based interface that has been added to
8 the Bacula project for version 7.0 and later.
9
10 \section{New Features in 11.0.0}
11
12 \subsection{Upgrade to 11.0.0}
13
14 Baculum 9.x and older does not work with Bacula 11.0 because of the new catalog
15 format in Bacula 11.0.0.
16
17 Baculum 11.0 works with Bacula < 11.0 but two file list specific functions does
18 not work:
19 \begin{bitemize}
20 \item searching jobs by filename in the restore wizard
21 \item the file list on the finished backup job page
22 \end{bitemize}
23
24 Fully supported are the following relations:
25
26 \begin{bitemize}
27 \item Baculum 9.x with Bacula Director < 11.0
28 \item Baculum 11.0 with Bacula Director >= 11.0
29 \end{bitemize}
30
31 \subsection{Multi-user interface improvements}
32
33 There have been added new functions and improvements to the multi-user
34 interface and restricted access.
35
36 The Security page has new tabs:
37
38 \begin{bitemize}
39 \item Console ACLs
40 \item OAuth2 clients
41 \item API hosts
42 \end{bitemize}
43
44 These new tabs help to configure OAuth2 accounts, create restricted Bacula
45 Console for users and create API hosts. They ease the process of creating
46 users with a restricted Bacula resources access.
47
48 \subsection{Add searching jobs by filename in the restore wizard}
49
50 In the restore wizard now is possible to select job to restore by
51 filename of file stored in backups. There is also possible to limit
52 results to specific path.
53
54 \subsection{Show more detailed job file list}
55
56 The job file list now displays file details like: file attributes,
57 UID, GID, size, mtime and information if the file record for saved or
58 deleted file.
59
60 \subsection{Add graphs to job view page}
61
62 On the job view page, new pie and bar graphs for selected job are available.
63
64 \subsection{Implement graphical status storage}
65
66 On the storage status page are available two new types of the status (raw
67 and graphical). The graphical status page is modern and refreshed
68 asynchronously.
69
70 \subsection{Add Russian translations}
71
72 \subsection{Global messages log window}
73
74 There has been added new window to browse Bacula logs in a friendly way.
75
76 \subsection{Job status weather}
77
78 Add the job status weather on job list page to express current job condition.
79
80 \subsection{Restore wizard improvements}
81
82 In the restore wizard has been added listing and browsing names encoded in
83 non-UTF encoding.
84
85 \subsection{New API endpoints}
86
87 \begin{bitemize}
88 \item /oauth2/clients
89 \item /oauth2/clients/{client\_id}
90 \item /jobs/files
91 \end{bitemize}
92
93 \subsection{New parameters in API endpoints}
94
95 \begin{bitemize}
96 \item /jobs/{jobid}/files - 'details' parameter
97 \item /storages/show - 'output' parameter
98 \item /storages/{storageid}/show - 'output' parameter
99 \end{bitemize}
100
101 {\bf Note}
102 Upgrade from Baculum 9.6 to Baculum 11.0 is fully supported both for
103 installations using binary packages and using source archives.
104
105 \section{New Features in 9.6.0}
106
107 \subsection{Upgrade to 9.6.4}
108 There has been introduced new way of managing users. If you use default Basic
109 authetication - no additional change is required. If you use custom auth method
110 realized by web server - no additional change is requred. If it is LDAP auth
111 please consider switching to new LDAP auth method in Baculum Web.
112
113 {\bf Import users}
114
115 Importing Basic users from default user file to Baculum Web is done automatically.
116 If you would like to import LDAP users to Baculum Web, you can use import option
117 available on the Security page.
118
119 {\bf New dependency}
120
121 There has been added a new dependency. It is PHP LDAP module. There is required to
122 install this module (php-ldap package) after upgrade. Appropriate information
123 about this dependency is displayed on the Baculum Web page. If you install Baculum
124 using binary packages, no additional action is needed because this dependency will
125 be installed automatically.
126
127 \subsection{Support for commands that can take a long time}
128
129 Some commands executed in bconsole can take a long time. They are for example:
130 label tape volumes in autochanger, update slots without barcodes, estimate job
131 command. To Baculum has been added support for these long time taking actions.
132 Previously if command took time longer than 30 seconds, the request
133 timed out.
134
135 {\bf Note}
136 On the Baculum API side has been changed way of sending requests for
137 the above command. More details about it you can find in the Baculum API
138 documentation.
139
140 \subsection{Support for SELinux}
141
142 There are new SELinux policy modules for Baculum API and Baculum Web. They
143 can be applied manually or by installing new rpm packages available in Baculum
144 repositories for CentOS and Fedora:
145
146 \begin{itemize}
147 \item baculum-api-selinux
148 \item baculum-web-selinux
149 \end{itemize}
150
151 \subsection{Graphical client status}
152
153 In Baculum Web on the client page is available new graphical client client.
154
155 \subsection{Graphical running job status}
156
157 In Baculum Web on the running job page is available new graphical running job
158 status that shows detailed information about current job. For backup job type
159 the status also displays file and byte progress bars which base on estimated
160 values.
161
162 \subsection{Capability to start, stop and restart components}
163
164 In Baculum API and Baculum Web are now available actions to start, stop and
165 restart Bacula components. Actions can be defined by users and they can be
166 executed from Baculum Web interface or directly by sending requests to
167 Baculum API.
168
169 \subsection{Statistics configuration}
170
171 Statistics resource provides new feature in Bacula that enables saving Bacula
172 component statistics to external databases such as Graphite or CSV file.
173 The statistics are now configurable on the Baculum interface.
174
175 \subsection{New graph types}
176
177 In Baculum Web on graph page are available new graph types:
178
179 \begin{itemize}
180 \item Job size / hour
181 \item Job size / day
182 \item Average job size / hour
183 \item Average job size / day
184 \item Job files / time
185 \item Job files / hour
186 \item Job files / day
187 \item Average job files / hour
188 \item Average job files / day
189 \item Job count / hour
190 \item Job count / day
191 \item Job duration / time
192 \item Average job speed / Time
193 \item Jobs status / day
194 \end{itemize}
195
196 \subsection{Support for new directives}
197
198 New Director directives support:
199
200 \begin{itemize}
201 \item Director resource:
202 \begin{itemize}
203 \item CommCompression
204 \end{itemize}
205 \item Job resource:
206 \begin{itemize}
207 \item VirtualFullBackupPool
208 \item MaxVirtualFullInterval
209 \item BackupsToKeep
210 \item DeleteConsolidatedJobs
211 \end{itemize}
212 \item JobDefs resource:
213 \begin{itemize}
214 \item VirtualFullBackupPool
215 \item MaxVirtualFullInterval
216 \item BackupsToKeep
217 \item DeleteConsolidatedJobs
218 \end{itemize}
219 \item Console resource:
220 \begin{itemize}
221 \item RestoreClientAcl
222 \item BackupClientAcl
223 \item DirectoryAcl
224 \end{itemize}
225 \end{itemize}
226
227 New Storage Daemon directives support:
228
229 \begin{itemize}
230 \item Storage resource:
231 \begin{itemize}
232 \item CommCompression
233 \end{itemize}
234 \item Device resource:
235 \begin{itemize}
236 \item WormCommand
237 \item Cloud
238 \end{itemize}
239 \item Cloud resource:
240 \begin{itemize}
241 \item Name
242 \item Description
243 \item Driver
244 \item HostName
245 \item BucketName
246 \item AccessKey
247 \item SecretKey
248 \item Region
249 \item Protocol
250 \item UriStyle
251 \item TruncateCache
252 \item Upload
253 \item MaximumConcurrentUploads
254 \item MaximumConcurrentDownloads
255 \item MaximumUploadBandwidth
256 \item MaximumDownloadBandwidth
257 \end{itemize}
258 \end{itemize}
259
260 New File Daemon directives support:
261
262 \begin{itemize}
263 \item FileDaemon resource:
264 \begin{itemize}
265 \item CommCompression
266 \end{itemize}
267 \end{itemize}
268
269 New Console directives support:
270
271 \begin{itemize}
272 \item Console resource:
273 \begin{itemize}
274 \item CommCompression
275 \end{itemize}
276 \end{itemize}
277
278 \subsection{Changes in API endpoints}
279
280 Please note that in Baculum API have been changed endpoints with access to
281 API panel and with access OAuth2 tokens. New endpoints are follow:
282
283 \begin{itemize}
284 \item / - Baculum API panel
285 \item /oauth/authorize - to authorize in authorization server
286 \item /oauth/token - to get token from authorization server
287 \end{itemize}
288
289 For backward compatibility previous panel and OAuth2 endpoints are still
290 available, but they will be removed in the future.
291
292 {\bf Note}
293 For future versions Baculum API users, who use OAuth2 authorization and call
294 API by own scripts, need to switch in theris scripts old OAuth2 endpoints
295 to the new ones.
296 Users, who install Baculum API from source archive, have to update the web
297 server configuration to support new endpoints.
298 Users, who install Baculum from binary packages, do not need to take any
299 additional action.
300
301 {\bf Note}
302 Starting from version 9.6.0 there has been finished support for old
303 API endpoints that do not contain version 'v1' in paths.
304
305 \subsection{New API functions}
306
307 In Baculum API are added the following new functions:
308
309 \begin{itemize}
310 \item label volume with barcodes
311 \item label volume without barcode
312 \item update slots with barcodes
313 \item update slots without barcodes
314 \item start, stop and restart Bacula components
315 \item status client
316 \item set bandwidth limit for client
317 \item set bandwidth limit for job
318 \item list job files
319 \end{itemize}
320
321 \subsection{New Web controls}
322
323 The Baculum Web are added new controls to support:
324
325 \begin{itemize}
326 \item password directives with show/hide option
327 \item speed type directives
328 \item multiple the same Console ACL directives
329 \end{itemize}
330
331 \subsection{Miscellaneous improvements}
332
333 Miscellaneous improvements in Baculum API and Baculum Web:
334
335 \begin{itemize}
336 \item add option to show size unit values as decimal or binary bytes
337 \item add version number to API and Web
338 \item restore wizard improvements to use restore file browsers on different
339 screen sizes and on mobile devices
340 \item add on status client page client and job bandwidth limit setting
341 \item add list job files tab to the job history page
342 \item add job history list on job page
343 \end{itemize}
344
345 \section{Base Features}
346
347 Baculum provides the following base features:
348
349 \begin{itemize}
350 \item Running Bacula jobs (backup, restore, verify...).
351 \item Baculum API with OAuth2 authorization and HTTP Basic authentication.
352 \item Baculum Web GUI - modern mobile-friendly web interface.
353 \item Configuring Bacula on local and remote hosts.
354 \item Monitoring Bacula service status.
355 \item Bacula console available via a Web window.
356 \item Multi-user interface.
357 \item Support for customized and restricted consoles (Console ACL function).
358 \item Volume management.
359 \item User friendly graphs and metrics.
360 \item Basic storage daemon operations (mount, umount, release, ...).
361 \item Easy to use configuration and restore wizards.
362 \item Live AJAX based statuses.
363 \end{itemize}
364
365 To try Baculum features without installation, please visit the Baculum online
366 demo page available at the following address:
367
368 \bref{https://baculum.app}{https://baculum.app}
369
370 \section{General Requirements}
371
372 Environment for Baculum Web installation should have following components
373 installed:
374
375 \begin{itemize}
376 \item A web server - with URL rewrite module loaded. Baculum Web has been
377 tested with Apache and Lighttpd web servers.
378 \item PHP 5.4.0 or higher with following modules installed:
379 \begin{itemize}
380 \item PHP cURL module
381 \item PHP DOM module
382 \item PHP JSON module
383 \item PHP LDAP module
384 \end{itemize}
385 \end{itemize}
386
387 Environment for Baculum API installation should have following components
388 installed:
389
390 \begin{itemize}
391 \item A web server - with URL rewrite module loaded. Baculum has been
392 tested with Apache and Lighttpd web servers.
393 \item PHP 5.4.0 or higher with following modules installed:
394 \begin{itemize}
395 \item PHP PDO support - depending on your catalog database: PDO PostgreSQL
396 or PDO MySQL. Note, in case using MySQL database there is required to use MySQL
397 native driver. It is php-mysqlnd for PHP, not php-mysql.
398 \item PHP BCMath module
399 \item PHP DOM module
400 \item PHP JSON module
401 \end{itemize}
402 \item A working Bacula bconsole - configured Bacula text based console
403 \item Access to the Bacula Catalog database (local or remote)
404 \item In case using config module, read and write access to Bacula configuration
405 files
406 \end{itemize}
407
408
409 With installation from binary packages (deb, rpm) all requirements
410 will be automatically installed as packages dependencies.
411
412 \section{Installation Baculum API from rpm binary packages}
413
414 {\bf Note}
415 Before start using Baculum API and Baculum Web version 9.0.0 and later please
416 backup your Bacula configuration in safe place. It is specially important
417 because on first save config action the Bacula configuration is joined into one
418 file per Bacula component.\\
419
420 For rpm binary there are the following packages:
421
422 \begin{itemize}
423 \item baculum-api - main Baculum API package with application files
424 \item baculum-api-httpd - Apache web server configuration files for Baculum API
425 \item baculum-api-lighttpd - Lighttpd web server configuration files for Baculum API
426 \item baculum-api-selinux - SELinux policy module for Baculum API
427 \item baculum-common - Common files for Baculum API and Baculum Web
428 \item baculum-web - main Baculum Web package with application files
429 \item baculum-web-httpd - Apache web server configuration files for Baculum Web
430 \item baculum-web-lighttpd - Lighttpd web server configuration files for Baculum Web
431 \item baculum-web-selinux - SELinux policy module for Baculum Web
432 \end{itemize}
433
434 \subsection{Add the Baculum rpm repository}
435
436 To add the Baculum repository, first you must import the Baculum public key:
437
438 \begin{verbatim}
439 rpm --import http://www.bacula.org/downloads/baculum/baculum.pub
440 \end{verbatim}
441
442 Once the key is imported, the next step is to add the repository
443 definition. First you must create the following file:
444
445 \begin{verbatim}
446 /etc/yum.repos.d/baculum.repo
447 \end{verbatim}
448
449 For CentOS 7 the {\bf baculum.repo} file should have the following content:
450
451 For Bacula Director <= 9.6
452
453 \begin{verbatim}
454 [baculumrepo]
455 name=Baculum CentOS repository
456 baseurl=http://www.bacula.org/downloads/baculum/stable/centos
457 gpgcheck=1
458 enabled=1
459 \end{verbatim}
460
461 For Bacula Director >= 11.0
462
463 \begin{verbatim}
464 [baculumrepo]
465 name=Baculum CentOS repository
466 baseurl=http://www.bacula.org/downloads/baculum/stable-11/centos
467 gpgcheck=1
468 enabled=1
469 \end{verbatim}
470
471 For CentOS 8 the {\bf baculum.repo} file should have the following content:
472
473 For Bacula Director <= 9.6
474
475 \begin{verbatim}
476 [baculumrepo]
477 name=Baculum CentOS repository
478 baseurl=http://www.bacula.org/downloads/baculum/stable/centos8
479 gpgcheck=1
480 enabled=1
481 \end{verbatim}
482
483 For Bacula Director >= 11.0
484
485 \begin{verbatim}
486 [baculumrepo]
487 name=Baculum CentOS repository
488 baseurl=http://www.bacula.org/downloads/baculum/stable-11/centos8
489 gpgcheck=1
490 enabled=1
491 \end{verbatim}
492
493 For Fedora 33 the {\bf baculum.repo} file should have the following content:
494
495 For Bacula Director <= 9.6
496
497 \begin{verbatim}
498 [baculumrepo]
499 name=Baculum Fedora repository
500 baseurl=http://www.bacula.org/downloads/baculum/stable/fedora33
501 gpgcheck=1
502 enabled=1
503 \end{verbatim}
504
505 For Bacula Director >= 11.0
506
507 \begin{verbatim}
508 [baculumrepo]
509 name=Baculum Fedora repository
510 baseurl=http://www.bacula.org/downloads/baculum/stable-11/fedora33
511 gpgcheck=1
512 enabled=1
513 \end{verbatim}
514
515 For Fedora 34 the {\bf baculum.repo} file should have the following content:
516
517 For Bacula Director >= 11.0
518
519 \begin{verbatim}
520 [baculumrepo]
521 name=Baculum Fedora repository
522 baseurl=http://www.bacula.org/downloads/baculum/stable-11/fedora34
523 gpgcheck=1
524 enabled=1
525 \end{verbatim}
526
527 \subsection{Installation for Apache}
528
529 Install Baculum API for the Apache web server as follows:
530
531 \begin{verbatim}
532 yum install baculum-common baculum-api baculum-api-httpd
533 \end{verbatim}
534
535 Restart your Apache web server:
536
537 \begin{verbatim}
538 systemctl restart httpd
539 \end{verbatim}
540
541
542 \subsection{Installation for Lighttpd}
543
544 Installation on system with access via Lighttpd is as follows:
545
546 \begin{verbatim}
547 yum install baculum-common baculum-api baculum-api-lighttpd
548 \end{verbatim}
549
550 Please note that in case CentOS distribution the Lighttpd web server is
551 available in the distribution packages after enabling the EPEL repository.
552
553 Start Baculum API as application using the Lighttpd web server:
554
555 \begin{verbatim}
556 systemctl start baculum-api-lighttpd
557 \end{verbatim}
558
559 \subsection{SELinux support}
560
561 To enable Baculum API support for SELinux is needed to install the following
562 binary package:
563
564 \begin{verbatim}
565 yum install baculum-api-selinux
566 \end{verbatim}
567
568 \subsection{Access to bconsole via sudo for Apache and Lighttpd}
569
570 Baculum API requires access to Bconsole and to Bacula JSON programs.
571 To configure Bconsole sudo access and the Bacula JSON programs access
572 there can use following entries in newly created Baculum sudoers.d file
573 (usually in path /etc/sudoers.d/baculum):\\
574
575 {\bf Note}, please define sudo for the Bacula JSON programs only when
576 you are going use Bacula configuration module in Baculum.
577
578 In case default Apache user, the file contents must be:
579
580 \begin{verbatim}
581 Defaults:apache !requiretty
582 apache ALL=NOPASSWD: /usr/sbin/bconsole
583 apache ALL=NOPASSWD: /usr/sbin/bdirjson
584 apache ALL=NOPASSWD: /usr/sbin/bsdjson
585 apache ALL=NOPASSWD: /usr/sbin/bfdjson
586 apache ALL=NOPASSWD: /usr/sbin/bbconsjson
587 \end{verbatim}
588
589 In case default Lighttpd user the file contents must be:
590
591 \begin{verbatim}
592 Defaults:lighttpd !requiretty
593 lighttpd ALL=NOPASSWD: /usr/sbin/bconsole
594 lighttpd ALL=NOPASSWD: /usr/sbin/bdirjson
595 lighttpd ALL=NOPASSWD: /usr/sbin/bsdjson
596 lighttpd ALL=NOPASSWD: /usr/sbin/bfdjson
597 lighttpd ALL=NOPASSWD: /usr/sbin/bbconsjson
598 \end{verbatim}
599
600 \section{Installation Baculum API from deb binary packages}
601
602 {\bf Note}
603 Before start using Baculum API and Baculum Web version 9.0.0 and later please
604 backup your Bacula configuration in safe place. It is specially important
605 because on first save config action the Bacula configuration is joined into one
606 file per Bacula component.\\
607
608 For deb binary there are the following packages:
609
610 \begin{itemize}
611 \item baculum-api - main Baculum API package with application files
612 \item baculum-api-apache2 - Apache web server configuration files for Baculum API
613 \item baculum-api-lighttpd - Lighttpd web server configuration files for Baculum API
614 \item baculum-common - Common files for Baculum API and Baculum Web
615 \item baculum-web - main Baculum Web package with application files
616 \item baculum-web-apache2 - Apache web server configuration files for Baculum Web
617 \item baculum-web-lighttpd - Lighttpd web server configuration files for Baculum Web
618 \end{itemize}
619
620 \subsection{Add the Baculum deb repository}
621
622 To add the Baculum repository, first import the Baculum public key:
623
624 \begin{verbatim}
625 wget -qO - http://www.bacula.org/downloads/baculum/baculum.pub | apt-key add -
626 \end{verbatim}
627
628 Once the key is imported, the next step is to create
629 a new baculum file:
630
631 \begin{verbatim}
632 /etc/apt/sources.list.d/baculum.list
633 \end{verbatim}
634
635 For Debian 9 Stretch the {\bf baculum.list} file should have the following content:
636
637 For Bacula Director <= 9.6
638
639 \begin{verbatim}
640 deb http://www.bacula.org/downloads/baculum/stable/debian stretch main
641 deb-src http://www.bacula.org/downloads/baculum/stable/debian stretch main
642 \end{verbatim}
643
644 For Bacula Director >= 11.0
645
646 \begin{verbatim}
647 deb http://www.bacula.org/downloads/baculum/stable-11/debian stretch main
648 deb-src http://www.bacula.org/downloads/baculum/stable-11/debian stretch main
649 \end{verbatim}
650
651 For Debian 10 Buster the {\bf baculum.list} file should have the following content:
652
653 For Bacula Director <= 9.6
654
655 \begin{verbatim}
656 deb http://www.bacula.org/downloads/baculum/stable/debian buster main
657 deb-src http://www.bacula.org/downloads/baculum/stable/debian buster main
658 \end{verbatim}
659
660 For Bacula Director >= 11.0
661
662 \begin{verbatim}
663 deb http://www.bacula.org/downloads/baculum/stable-11/debian buster main
664 deb-src http://www.bacula.org/downloads/baculum/stable-11/debian buster main
665 \end{verbatim}
666
667 For Debian 11 Bullseye the {\bf baculum.list} file should have the following content:
668
669 For Bacula Director >= 11.0
670
671 \begin{verbatim}
672 deb http://www.bacula.org/downloads/baculum/stable-11/debian bullseye main
673 deb-src http://www.bacula.org/downloads/baculum/stable-11/debian bullseye main
674 \end{verbatim}
675
676 For Ubuntu 18.04 Bionic the {\bf baculum.list} file should have the following content:
677
678 For Bacula Director <= 9.6
679
680 \begin{verbatim}
681 deb [ arch=amd64 ] http://www.bacula.org/downloads/baculum/stable/ubuntu bionic main
682 deb-src http://www.bacula.org/downloads/baculum/stable/ubuntu bionic main
683 \end{verbatim}
684
685 For Bacula Director >= 11.0
686
687 \begin{verbatim}
688 deb [ arch=amd64 ] http://www.bacula.org/downloads/baculum/stable-11/ubuntu bionic main
689 deb-src http://www.bacula.org/downloads/baculum/stable-11/ubuntu bionic main
690 \end{verbatim}
691
692 For Ubuntu 20.04 Focal the {\bf baculum.list} file should have the following content:
693
694 For Bacula Director <= 9.6
695
696 \begin{verbatim}
697 deb [ arch=amd64 ] http://www.bacula.org/downloads/baculum/stable/ubuntu focal main
698 deb-src http://www.bacula.org/downloads/baculum/stable/ubuntu focal main
699 \end{verbatim}
700
701 For Bacula Director >= 11.0
702
703 \begin{verbatim}
704 deb [ arch=amd64 ] http://www.bacula.org/downloads/baculum/stable-11/ubuntu focal main
705 deb-src http://www.bacula.org/downloads/baculum/stable-11/ubuntu focal main
706 \end{verbatim}
707
708 After adding repository definition, please refresh repository indexes:
709 \begin{verbatim}
710 apt-get update
711 \end{verbatim}
712
713 \subsection{Installation for Apache}
714
715 To install Baculum API access via Apache web server by using apt
716 packages manager use the command:
717
718 \begin{verbatim}
719 apt-get install baculum-common baculum-api baculum-api-apache2
720 \end{verbatim}
721
722 Next you must enable mod\_rewrite module for Apache, with the
723 following command:
724
725 \begin{verbatim}
726 a2enmod rewrite
727 \end{verbatim}
728
729 and include Baculum VirtualHost definition in the Apache configuration
730 with:
731
732 \begin{verbatim}
733 a2ensite baculum-api
734 \end{verbatim}
735
736 Then restart your Apache server with:
737
738 \begin{verbatim}
739 systemctl restart apache2
740 \end{verbatim}
741
742 \subsection{Installation for Lighttpd}
743
744 Example installation with access via Lighttpd web server looks following:
745
746 \begin{verbatim}
747 apt-get install baculum-common baculum-api baculum-api-lighttpd
748 \end{verbatim}
749
750 Start Baculum API as application available through Lighttpd web server:
751
752 \begin{verbatim}
753 systemctl start baculum-api-lighttpd
754 \end{verbatim}
755
756 \subsection{Access to bconsole via sudo for Apache and Lighttpd}
757
758 Baculum API requires access to Bconsole and to the Bacula JSON programs.
759 To configure Bconsole sudo access, we strongly recommend that you create
760 a Baculum sudoers.d file, which should be in /etc/sudoers.d/baculum:
761
762 {\bf Note}, please define sudo for the Bacula JSON programs only when
763 you are going use Bacula configuration module in Baculum.
764
765 Both for Apache and Lighttpd user the file contents can be:
766
767 \begin{verbatim}
768 Defaults:www-data !requiretty
769 www-data ALL=NOPASSWD: /usr/sbin/bconsole
770 www-data ALL=NOPASSWD: /usr/sbin/bdirjson
771 www-data ALL=NOPASSWD: /usr/sbin/bsdjson
772 www-data ALL=NOPASSWD: /usr/sbin/bfdjson
773 www-data ALL=NOPASSWD: /usr/sbin/bbconsjson
774 \end{verbatim}
775
776 \section{Debugging your First Baculum API Login}
777 At each step of the initial login to Baculum, the screen will have a test
778 button, that will allow you to check if your parameters were correctly entered.
779 If not, you will see error message on the wizard page. You can also get
780 additional detail by examining the Apache error log, that is usually found at:
781
782 \begin{verbatim}
783 /var/log/httpd/baculum-api-error.log
784 \end{verbatim}
785
786 If you use Lighttpd thento get additional detail you can check:
787
788 \begin{verbatim}
789 /var/log/lighttpd/baculum-api-error.log
790 \end{verbatim}
791
792 In addition, special debug output is placed by Baculum in the file:
793
794 \begin{verbatim}
795 /usr/share/baculum/htdocs/protected/API/Logs/baculum-api.log
796 \end{verbatim}
797
798 The debug you can enable in file:
799 \begin{verbatim}
800 /usr/share/baculum/htdocs/protected/API/Config/api.conf
801 \end{verbatim}
802
803 by switching in [api] section option debug to "1".
804
805 With the information in those two files, you can usually quickly find and
806 correct most problems.
807
808 \section{Installation Baculum Web from rpm binary packages}
809
810 \subsection{Installation for Apache}
811
812 Install Baculum Web for the Apache web server as follows:
813
814 \begin{verbatim}
815 yum install baculum-common baculum-web baculum-web-httpd
816 \end{verbatim}
817
818 Restart your Apache web server:
819
820 \begin{verbatim}
821 systemctl restart httpd
822 \end{verbatim}
823
824 \subsection{Installation for Lighttpd}
825
826 Installation on system with access via Lighttpd is as follows
827
828 \begin{verbatim}
829 yum install baculum-common baculum-web baculum-web-lighttpd
830 \end{verbatim}
831
832 Please note that in case CentOS distribution the Lighttpd web server is
833 available in the distribution packages after enabling the EPEL repository.
834
835 Start Baculum as application using the Lighttpd web server:
836
837 \begin{verbatim}
838 systemctl start baculum-web-lighttpd
839 \end{verbatim}
840
841 \subsection{SELinux support}
842
843 To enable Baculum Web support for SELinux is needed to install the following
844 binary package:
845
846 \begin{verbatim}
847 yum install baculum-web-selinux
848 \end{verbatim}
849
850 \section{Installation Baculum Web from deb binary packages}
851
852 \subsection{Installation for Apache}
853
854 To install Baculum Web access via Apache web server by using apt packages
855 manager use the command:
856
857 \begin{verbatim}
858 apt-get install baculum-common baculum-web baculum-web-apache2
859 \end{verbatim}
860
861 Next you must enable mod\_rewrite module for Apache, with the
862 following command:
863
864 \begin{verbatim}
865 a2enmod rewrite
866 \end{verbatim}
867
868 and include Baculum VirtualHost definition in the Apache configuration with:
869
870 \begin{verbatim}
871 a2ensite baculum-web
872 \end{verbatim}
873
874 The restart your Apache server with:
875
876 \begin{verbatim}
877 systemctl restart apache2
878 \end{verbatim}
879
880 \subsection{Installation for Lighttpd}
881
882 Example installation with access via Lighttpd web server looks following:
883
884 \begin{verbatim}
885 apt-get install baculum-common baculum-web baculum-web-lighttpd
886 \end{verbatim}
887
888 Start Baculum Web as application available through Lighttpd web server:
889
890 \begin{verbatim}
891 systemctl start baculum-web-lighttpd
892 \end{verbatim}
893
894 \section{Running Baculum API and Web for the First Time}
895
896 \subsection{Running Baculum API}
897
898 Access to Baculum API from web browser: \textbf{http://localhost:9096}
899
900 First time login: \textbf{admin}
901
902 First time password: \textbf{admin}
903
904
905 \subsection{Running Baculum Web}
906
907 Access to Baculum Web from web browser: \textbf{http://localhost:9095}
908
909 First time login: \textbf{admin}
910
911 First time password: \textbf{admin}
912
913 \subsection{Installation wizards}
914
915 \textbf{Installation with HTTP Basic authentication}
916
917 \bimageH{baculum_install_basic}{Baculum installation with HTTP Basic authentication}{fig:baculuminstallbasic}
918
919 \smallskip
920
921 \textbf{Installation with OAuth2 authorization}
922
923 \bimageH{baculum_install_oauth2}{Baculum installation with HTTP Basic authentication}{fig:baculuminstalloauth2}
924
925 \smallskip
926
927 \subsection{Configuring Bacula}
928 During first use the Bacula configuration feature when 'Save' button is clicked,
929 there can be visible an permission error similar to this error:
930
931 \begin{verbatim}
932 Error 1000: Internal error.
933 [Warning] file_put_contents(/etc/bacula/bacula-dir.conf): failed to open stream:
934 Permission denied (@line 56 in file
935 /usr/share/baculum/htdocs/protected/Common/Class/ConfigBacula.php).
936 \end{verbatim}
937
938 It means that the Baculum API web server user does not have permission to write
939 Bacula configuration file. To solve it, please setup permissions for Bacula
940 configuration files to allow web server user have write access.
941
942 \section{Baculum API documentation}
943
944 \subsection{API version 1}
945
946 The documentation for Baculum API version 1 is placed at the following link:
947
948 \bref{https://www.bacula.org/downloads/baculum/baculum-api-v1/}{https://www.bacula.org/downloads/baculum/baculum-api-v1/}
949
950 \subsection{API version 2}
951
952 The documentation for Baculum API version 2 is placed at the following link:
953
954 \bref{https://www.bacula.org/downloads/baculum/baculum-api-v2/}{https://www.bacula.org/downloads/baculum/baculum-api-v2/}
955
956 Changes in API version 2:
957
958 \begin{bitemize}
959 \item Send request body parameters to the API in JSON format instead of
960 POST form parameters.
961 \item Drop using the create[] and update[] surrounds in the POST and PUT
962 request body parameters.
963 \item Move the /api/v1/status/\{director|storage|client\}/ endpoints to:
964 /api/v2/clients/\{clientid\}/status, /api/v2/storages/\{storageid\}/status,
965 /api/v2/directors/\{director\_name\}/status.
966 \item Unify /jobs/\{jobid\}/files endpoint output for detailed and normal modes.
967 \item Stop using OAuth2 'status' scope.
968 \item API version 1 is still possible to use and it is preserved. Nothing
969 changes here.
970 \item New and modern API admin panel.
971 \end{bitemize}
972
973 \subsubsection{Example usage}
974
975 Example request to run a job when the OAuth2 authorization is enabled:
976
977 \begin{verbatim}
978 curl \
979 -X POST \
980 'https://baculum-api:9096/api/v2/jobs/run' \
981 -H 'Content-Type: application/json' \
982 -H 'Authorization: Bearer 6bd7c887e768efb9a031d0545aa0552de0140fe2' \
983 --data-raw '{"name": "BackupClient1", "level": "F", "client": "darkstar-fd","storage": "UP","pool": "Full-VTL","fileset": "ETC FS"}'
984 \end{verbatim}
985
986 where:
987
988 \begin{bitemize}
989 \item API instance address is: baculum-api
990 \item OAuth2 access token is: 6bd7c887e768efb9a031d0545aa0552de0140fe2
991 \end{bitemize}
992
993 Example request to run a job when the Basic authentication is enabled:
994
995 \begin{verbatim}
996 curl \
997 -X POST \
998 'https://baculum-api:9096/api/v2/jobs/run' \
999 --basic \
1000 -u 'myuser:mypass' \
1001 -H 'Content-Type: application/json' \
1002 --data-raw '{"name": "BackupClient1", "level": "F", "client": "darkstar-fd","storage": "UP","pool": "Full-VTL","fileset": "ETC FS"}'
1003 \end{verbatim}
1004
1005 where:
1006
1007 \begin{bitemize}
1008 \item API instance address is: baculum-api
1009 \item Basic user is: myuser
1010 \item Basic user password is: mypass
1011 \end{bitemize}
1012
1013 \section{Installation from the source tar file}
1014
1015 There is possible to install Baculum from the source bacula-gui tar archive. To
1016 install please unpack the bacula-gui source archive and go to this unpacked
1017 directory:
1018
1019 \begin{verbatim}
1020 cd bacula-gui-9.6.0/baculum/
1021 \end{verbatim}
1022
1023 Then please prepare the Baculum API and the Baculum Web files depending on used
1024 distribution in the way described below.
1025
1026 In this description the document root directory for web files is path:
1027 {\bf /var/www/baculum}. This location can be changed during installation in
1028 the {\bf WWWDIR} parameter value.
1029
1030 \subsection{Manual installation on rpm-based Linux distributions}
1031
1032 To prepare all Baculum files to installation please execute from the source
1033 files path the following command:
1034 \begin{verbatim}
1035 make build DESTDIR=/tmp/baculum-files WWWDIR=/var/www/baculum
1036 \end{verbatim}
1037
1038 After executing above command, the directory {\bf /tmp/baculum-files} should
1039 contain all required files ready to copy to destination system paths.
1040
1041 Install the Baculum API and the Baculum Web dependencies:
1042 \begin{verbatim}
1043 yum install httpd php php-common php-pdo php-mysqlnd php-pgsql php-bcmath php-json php-xml
1044 \end{verbatim}
1045
1046 Copy to the destination path all Baculum web type files:
1047 \begin{verbatim}
1048 cp -R /tmp/baculum-files/var/www/baculum/ /var/www
1049 \end{verbatim}
1050
1051 Copy the web server configuration files:
1052 \begin{verbatim}
1053 cp /tmp/baculum-files/etc/httpd/conf.d/baculum-*conf /etc/httpd/conf.d/
1054 \end{verbatim}
1055
1056 Copy the HTTP Basic authentication files:
1057 \begin{verbatim}
1058 cp /tmp/baculum-files/etc/baculum/Config-api-apache/baculum.users /var/www/baculum/protected/API/Config
1059 cp /tmp/baculum-files/etc/baculum/Config-web-apache/baculum.users /var/www/baculum/protected/Web/Config
1060 \end{verbatim}
1061
1062 Copy translation files:
1063 \begin{verbatim}
1064 cp --remove-destination /tmp/baculum-files/usr/share/locale/en/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/en/messages.mo
1065 cp --remove-destination /tmp/baculum-files/usr/share/locale/pl/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/pl/messages.mo
1066 cp --remove-destination /tmp/baculum-files/usr/share/locale/pt/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/pt/messages.mo
1067 cp --remove-destination /tmp/baculum-files/usr/share/locale/ru/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/ru/messages.mo
1068 cp --remove-destination /tmp/baculum-files/usr/share/locale/en/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/en/messages.mo
1069 cp --remove-destination /tmp/baculum-files/usr/share/locale/pl/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/pl/messages.mo
1070 cp --remove-destination /tmp/baculum-files/usr/share/locale/pt/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/pt/messages.mo
1071 cp --remove-destination /tmp/baculum-files/usr/share/locale/ja/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/ja/messages.mo
1072 cp --remove-destination /tmp/baculum-files/usr/share/locale/ru/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/ru/messages.mo
1073 \end{verbatim}
1074
1075 Set recursively owner and group for files and directories:
1076 \begin{verbatim}
1077 chown -R apache:apache /var/www/baculum
1078 \end{verbatim}
1079
1080 Prepare and install the SELinux module (if SELinux is used in operating system):
1081 \begin{verbatim}
1082 yum install selinux-policy-devel
1083
1084 make -C examples/selinux/ -f /usr/share/selinux/devel/Makefile baculum-api.pp
1085 make -C examples/selinux/ -f /usr/share/selinux/devel/Makefile baculum-web.pp
1086 install -D -m 644 examples/selinux/baculum-api.pp /usr/share/selinux/packages/baculum-api/baculum-api.pp
1087 install -D -m 644 examples/selinux/baculum-web.pp /usr/share/selinux/packages/baculum-web/baculum-web.pp
1088 semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/baculum/protected/API/Config(/.*)?'
1089 semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/baculum/protected/API/Logs(/.*)?'
1090 semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/baculum/protected/Web/Config(/.*)?'
1091 semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/baculum/protected/Web/Logs(/.*)?'
1092 semanage fcontext -a -t httpd_cache_t '/var/www/baculum/assets(/.*)?'
1093 semanage fcontext -a -t httpd_cache_t '/var/www/baculum/protected/runtime(/.*)?'
1094 restorecon -i -R '/var/www/baculum/protected/API/Config' '/var/www/baculum/protected/API/Logs' '/var/www/baculum/protected/Web/Config' '/var/www/baculum/protected/Web/Logs' '/var/www/baculum/assets' '/var/www/baculum/protected/runtime'
1095 semodule -i /usr/share/selinux/packages/baculum-api/baculum-api.pp
1096 semodule -i /usr/share/selinux/packages/baculum-web/baculum-web.pp
1097 \end{verbatim}
1098
1099 Start the Apache web server
1100 \begin{verbatim}
1101 systemctl start httpd
1102 \end{verbatim}
1103
1104 \subsection{Manual installation on deb-based Linux distributions}
1105
1106 To prepare all Baculum files to installation please execute from the source
1107 files path the following command:
1108 \begin{verbatim}
1109 make build DESTDIR=/tmp/baculum-files SAMPLETYPE=deb-template HTTPDNAME=apache2 HTTPDSITECONF=sites-available WWWDIR=/var/www/baculum
1110 \end{verbatim}
1111
1112 After executing above command, the directory {\bf /tmp/baculum-files} should
1113 contain all required files ready to copy to destination system paths.
1114
1115 Install the Baculum Web and the Baculum API dependencies:
1116
1117 \begin{verbatim}
1118 apt-get install apache2 libapache2-mod-php php-bcmath php-cgi php-mysql php-pgsql php-json php-xml php-curl
1119 \end{verbatim}
1120
1121 Copy to the destination path all Baculum web type files:
1122 \begin{verbatim}
1123 cp -R /tmp/baculum-files/var/www/baculum/ /var/www
1124 \end{verbatim}
1125
1126 Copy the web server configuration files:
1127 \begin{verbatim}
1128 cp /tmp/baculum-files/etc/apache2/sites-available/baculum-*conf /etc/apache2/sites-available/
1129 \end{verbatim}
1130
1131 Copy the HTTP Basic authentication files:
1132 \begin{verbatim}
1133 cp /tmp/baculum-files/etc/baculum/Config-api-apache/baculum.users /var/www/baculum/protected/API/Config
1134 cp /tmp/baculum-files/etc/baculum/Config-web-apache/baculum.users /var/www/baculum/protected/Web/Config
1135 \end{verbatim}
1136
1137 Copy translation files:
1138 \begin{verbatim}
1139 cp --remove-destination /tmp/baculum-files/usr/share/locale/en/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/en/messages.mo
1140 cp --remove-destination /tmp/baculum-files/usr/share/locale/pl/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/pl/messages.mo
1141 cp --remove-destination /tmp/baculum-files/usr/share/locale/pt/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/pt/messages.mo
1142 cp --remove-destination /tmp/baculum-files/usr/share/locale/ru/LC_MESSAGES/baculum-api.mo /var/www/baculum/protected/API/Lang/ru/messages.mo
1143 cp --remove-destination /tmp/baculum-files/usr/share/locale/en/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/en/messages.mo
1144 cp --remove-destination /tmp/baculum-files/usr/share/locale/pl/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/pl/messages.mo
1145 cp --remove-destination /tmp/baculum-files/usr/share/locale/pt/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/pt/messages.mo
1146 cp --remove-destination /tmp/baculum-files/usr/share/locale/ja/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/ja/messages.mo
1147 cp --remove-destination /tmp/baculum-files/usr/share/locale/ru/LC_MESSAGES/baculum-web.mo /var/www/baculum/protected/Web/Lang/ru/messages.mo
1148 \end{verbatim}
1149
1150 Set recursively owner and group for files and directories:
1151 \begin{verbatim}
1152 chown -R www-data:www-data /var/www/baculum
1153 \end{verbatim}
1154
1155 Enable the web server Baculum API and Baculum Web sites:
1156 \begin{verbatim}
1157 a2ensite baculum-api
1158 a2ensite baculum-web
1159 \end{verbatim}
1160
1161 Enable the URL rewrite module for the Apache web server:
1162 \begin{verbatim}
1163 a2enmod rewrite
1164 \end{verbatim}
1165
1166 Start the Apache web server
1167 \begin{verbatim}
1168 systemctl start apache2
1169 \end{verbatim}
1170
1171 \subsection{Validating manual installation}
1172
1173 To check manually installed the Baculum API and the Baculum Web files please
1174 use a script, which checks whether files and directories exist in proper paths,
1175 if they have set valid permissions, ownership and other requirements.
1176
1177 To check files for installation with Apache web server:
1178 \begin{verbatim}
1179 /tmp/baculum-files/baculum-install-checker.sh -a
1180 \end{verbatim}
1181
1182 To check files for installation with Lighttpd web server:
1183 \begin{verbatim}
1184 /tmp/baculum-files/baculum-install-checker.sh -l
1185 \end{verbatim}
1186
1187 \section{OAuth2 authorization}
1188
1189 In Baculum API you can setup OAuth2 for authorization and authentication.
1190
1191 To get an access token there is used {\bf Authorization Code Grant} flow.
1192 Authorization and access token URLs are as follow:
1193
1194 \begin{verbatim}
1195 Authorization URL: /oauth/authorize
1196 Access Token URL: /oauth/token
1197 \end{verbatim}
1198
1199 Baculum API does not use refresh tokens. After expiration token the client
1200 application has to re-authorize again.
1201
1202 Default expiration time for authorization code is 7 seconds, for access
1203 token 120 seconds. These values can be changed in:
1204
1205 \begin{verbatim}
1206 /usr/share/baculum/htdocs/protected/Common/Class/OAuth2.php
1207 \end{verbatim}
1208
1209 in constants AUTHORIZATION\_ID\_EXPIRES\_TIME and ACCESS\_TOKEN\_EXPIRES\_TIME.
1210
1211 Default OAuth2 callback URL in Baculum Web is following:
1212
1213 \begin{verbatim}
1214 https://baculumgui:9095/web/redirect
1215 \end{verbatim}
1216
1217 \subsection{Before running OAuth2}
1218
1219 {\bf Important note before using OAuth2}
1220
1221 When you decide to use OAuth2, you must change default HTTP Basic authentication
1222 setting. Otherwise OAuth2 will not work. It is all about enabling OAuth2 acces to
1223 /api/ endpoints but still keeping the HTTP Basic protection for the Baculum API panel
1224 pages.
1225
1226 For Apache this change consists in replacing in the Baculum API Apache config
1227 the Directory tag /usr/share/baculum/htdocs into Location tag /panel
1228
1229 \begin{verbatim}
1230 #
1231 # NOTE: When you use OAuth2 then change this Directory section
1232 # From: <Directory /usr/share/baculum/htdocs>
1233 # ...section body...
1234 # </Directory>
1235 # To: <Location /panel>
1236 # ...section body...
1237 # </Location>
1238 #
1239 <Directory /usr/share/baculum/htdocs>
1240 #<Location /panel>
1241 AuthType Basic
1242 AuthName "Baculum Auth"
1243 AuthUserFile /usr/share/baculum/htdocs/protected/API/Config/baculum.users
1244 Require valid-user
1245 #</Location>
1246 </Directory>
1247
1248 \end{verbatim}
1249
1250
1251 For Lighttpd this change consists in uncommenting in the Baculum API Lighttpd
1252 config lines as shown in the comment below.
1253
1254 \begin{verbatim}
1255 #
1256 # Uncomment this line and closing braces below when you use OAuth2
1257 #
1258 #$HTTP["url"] =~ "^/panel.*$" {
1259 auth.backend = "htpasswd"
1260 auth.backend.htpasswd.userfile = "/usr/share/baculum/htdocs/protected/API/Config/baculum.users"
1261 auth.require = ( "/" => (
1262 "method" => "basic",
1263 "realm" => "Baculum Auth",
1264 "require" => "valid-user"
1265 )
1266 )
1267 #}
1268 \end{verbatim}
1269
1270 \section{Multi-user interface}
1271
1272 Baculum enables access to Bacula resources for defined users, where every
1273 user uses own resources (Jobs, Clients, FileSets ...etc.). These resources
1274 are assigned to users by the Bacula Restricted Consoles and then they are
1275 used by Baculum.
1276
1277 To setup this multi-user interface there is needed to enable the OAuth2
1278 authorization on Baculum API hosts, that are used by the Baculum Web interface.
1279 There is also necessary to configure in the Director the Console resources for
1280 users and Bconsole config files dedicated for them.
1281
1282 {\bf Note}
1283 Since Baculum version 9.6.6.1 all the process described below can be done
1284 directly from the Baculum Web interface.
1285
1286 Minimal Console resource configuration can look as below. These {\bf CommandAcl}
1287 values in the configuration are required to proper working all available
1288 functions for normal Baculum users (run job, restore backup, cancel job,
1289 delete job and others).
1290
1291 \begin{verbatim}
1292 Console {
1293 Name = "Limited User 144"
1294 Password = "A6cTimESfLs7xPNOMC/ein92BF4="
1295 JobAcl = "BackupCatalog"
1296 JobAcl = "RestoreFiles"
1297 ClientAcl = "myhost-fd"
1298 StorageAcl = "File1"
1299 PoolAcl = "File"
1300 CommandAcl = "gui"
1301 CommandAcl = ".api"
1302 CommandAcl = ".jobs"
1303 CommandAcl = ".ls"
1304 CommandAcl = ".client"
1305 CommandAcl = ".fileset"
1306 CommandAcl = ".pool"
1307 CommandAcl = ".status"
1308 CommandAcl = ".storage"
1309 CommandAcl = ".bvfs_get_jobids"
1310 CommandAcl = ".bvfs_update"
1311 CommandAcl = ".bvfs_lsdirs"
1312 CommandAcl = ".bvfs_lsfiles"
1313 CommandAcl = ".bvfs_versions"
1314 CommandAcl = ".bvfs_restore"
1315 CommandAcl = ".bvfs_cleanup"
1316 CommandAcl = "restore"
1317 CommandAcl = "show"
1318 CommandAcl = "estimate"
1319 CommandAcl = "run"
1320 CommandAcl = "delete"
1321 CommandAcl = "cancel"
1322 FilesetAcl = "Full Set"
1323 CatalogAcl = "MyCatalog"
1324 WhereAcl = "/tmp/restore"
1325 }
1326 \end{verbatim}
1327
1328 Assigning Restricted Consoles to users is realized during configuring OAuth2
1329 accounts on API hosts panel as on attached screenshot.
1330
1331 \bimageH{baculum_add_oauth2_user_account}{Add OAuth2 user account}{fig:baculumaddoauth2}
1332
1333 Please note that in the OAuth2 scopes there is not "config" scope defined,
1334 because normal users don't have access to configuring Bacula resources by
1335 Baculum API hosts.
1336
1337 Once the OAuth2 accounts with assigned dedicated consoles are done, now you
1338 can connect Baculum Web to those new Baculum API OAuth2 accounts.
1339
1340 \bimageH{baculum_add_new_api_host}{Add new API host}{fig:baculumaddapihost}
1341
1342 At the end there is needed to create Baculum Web users and assign them
1343 to appropriate OAuth2 user accounts on API hosts.
1344
1345 \bimageH{baculum_define_user_to_api_host}{Define user to API host}{fig:baculumdefineuserapihost}
1346 \bimageH{baculum_assign_user_to_api_host}{Assing user to API host}{fig:baculumassignuserapihost}
1347
1348 Images below show example access to Baculum API hosts by a normal user and by
1349 an admin user. In this setting the administrator is able to manage Host A,
1350 Host B, Host C and the normal user is able to use Host B only.
1351
1352 {\bf Note}
1353 Since version 11.0.2.2 there is possible to assign multiple API hosts to one
1354 user account.
1355
1356 \bimageH{baculum_multi_user_admin_mode}{Multi user interface - admin user}{fig:baculummultiuseradminmode}
1357
1358 \smallskip
1359
1360 \bimageH{baculum_multi_user_user_mode}{Multi user interface - normal user}{fig:baculummultiuserusermode}
1361
1362 Normal (non-admin) user interface can look as on screenshot:
1363
1364 \bimageH{baculum_normal_user_dashboard}{Normal user dashboard}{fig:baculumnormaluserdashboard}
1365
1366 \subsection{Multi-user interface setup in steps}
1367
1368 Below you can find list with steps needed to setup the Baculum multi-user
1369 interface:
1370
1371 \begin{enumerate}
1372 \item Install Baculum API.
1373 \item Change the Baculum API web server config file to support OAuth2 and
1374 restart the web server.
1375 \item Go to the Baculum API installation wizard and fill needed forms on wizard
1376 steps.
1377 \item In "Authentication" step please select OAuth2 authorization option
1378 and define there administrator OAuth2 client account. It is an account without
1379 any dedicated Bconsole config file path (full bconsole access) and with all
1380 scopes.
1381 \item Finish the Baculum API wizard.
1382 \item Install Baculum Web. Go to the installation wizard and fill forms on each
1383 wizard step.
1384 \item In the "Add API host" step please select OAuth2 authorization option
1385 and please provide the administrator OAuth2 account parameters defined
1386 previously in the Baculum API installation wizard.
1387 \item Finish the Baculum Web wizard.
1388 \item Define in the Bacula Director configuration dedicated Consoles for users.
1389 You can do it on the Baculum interface or manually in the Director
1390 configuration file. At the end please reload the Director configuration.
1391 \item In Baculum API panel on the "OAuth2 clients" page create new OAuth2
1392 client accounts, each account for separate user or group of users. For each
1393 OAuth2 account in field "Dedicated Bconsole config file path" define separate
1394 Bconsole config file with access only to selected restricted console (the
1395 bconsole configuration files must be prepared manually before this step). In
1396 scopes field please be careful to not set "config" or "actions" scopes to
1397 regular user if it isn't your intention.
1398 \item In Baculum Web on the "Security" page in "API hosts" tab please click
1399 "Add API host" button and add there created in previous point all OAuth2
1400 client accounts.
1401 \item Go to the "Users" tab on the "Security" page, create new users and
1402 assign API hosts to them.
1403 \end{enumerate}
1404
1405 {\bf Note}
1406 Since Baculum version 9.6.6.1 if your use the OAuth2 account with 'oauth2'
1407 scope you can perform all above steps, that are doing on API side (add
1408 OAuth2 client, create dedicated Bconsole configuration file), directly in
1409 the Baculum Web interface on the Security page.
1410
1411 \section{Autochanger management}
1412 From version 11.0.2.1 Baculum provides an interface to manage tape
1413 autochangers. This function enables to do the following tasks:
1414
1415 \begin{bitemize}
1416 \item Load tape from slot to tape drive (with and without mounting tape).
1417 \item Unload tape from tape drive to slot.
1418 \item Update slots using barcordes.
1419 \item Update slots reading labels directly from volumes (for changers
1420 without barcode reader).
1421 \item Move tape(s) to import/export slots.
1422 \item Release single import/export slot.
1423 \item Release all import/export slots at once.
1424 \end{bitemize}
1425
1426 To manage autochanger there is needed to define autochanger tape drives and
1427 autochanger device setting on dedicated Device page for that available in
1428 the Baculum API panel. After that the autochanger management should be
1429 available on the Baculum Web side on the Storage page after selecting the
1430 Storage resource associated with the autochanger device.
1431
1432 \section{Screenshots}
1433
1434 \bimageH{baculum01}{Baculum dashboard}{fig:baculumdashboard}
1435
1436 \smallskip
1437
1438 \bimageH{baculum02}{Dashboard on mobile phone}{fig:baculummobdashboard}
1439
1440 \smallskip
1441
1442 \bimageH{baculum03}{Menu on mobile phone}{fig:baculummobmenu}
1443
1444 \smallskip
1445
1446 \bimageH{baculum04}{Job history list}{fig:baculumjobhistory}
1447
1448 \smallskip
1449
1450 \bimageH{baculum05}{Run job window}{fig:baculumrunjob}
1451
1452 \smallskip
1453
1454 \bimageH{baculum06}{Job details}{fig:baculumjobdetails}
1455
1456 \smallskip
1457
1458 \bimageH{baculum07}{Create new job}{fig:baculumnewjob}
1459
1460 \smallskip
1461
1462 \bimageH{baculum08}{Job status graph}{fig:baculumjobstatusgraph}
1463
1464 \smallskip
1465
1466 \bimageH{baculum09}{Client status}{fig:baculumclientstatus}