1 ################################################################
3 ################################################################
5 Bweb works well with 1.39 release.
9 3) intialise your configuration file
10 4) do some sql stuff (for postgresql user)
11 5) get a bconsole that work with Expect
12 6) get bacula log more useful
14 8) using sudo with autochanger
17 ################ FILE COPY #####################################
18 # you must get bweb cvs files
19 cvs -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula login
20 cvs -z3 -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula co -P gui
23 # first, copy bweb perl librarie in your PERL5 INC path
24 install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
26 # copy bweb perl program to you cgi location
27 mkdir -m 755 /usr/lib/cgi-bin/bweb
28 install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
31 mkdir -m 755 /etc/bacula
32 chown root:bacula /etc/bacula
33 echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf
34 chown www-data /etc/bacula/bweb.conf
36 # copy bweb template file
37 mkdir -p /usr/share/bweb/tpl
38 install -m 644 -o root -g root bweb/tpl/*.tpl /usr/share/bweb/tpl
40 # copy bweb graphics elements (bweb elements must reside on /bweb)
42 install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
46 WARNING : Your www-data user must be able to execute bconsole and able to read bconsole.conf !
47 You can create an bconsole group for that.
49 ################ USE FRENCH VERSION ############################
51 Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl
53 ################ INSTALL PERL LIBRARY ##########################
56 - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
64 You can install perl modules with CPAN
68 Or use your distribution
69 apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl
70 apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
72 ################ APACHE CONFIGURATION ##########################
74 It could be a good idea to protect your bweb installation.
76 Put this in you httpd.conf, and add user with htpasswd
78 <Directory /usr/lib/cgi-bin/bweb>
79 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
81 AuthName MyPrivateFile
82 AuthUserFile /etc/apache/htpasswd
88 ################ CONFIGURATION #################################
90 /etc/bacula/bweb.conf looks like : (you can edit it inside bweb)
92 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
94 'config_file' => '/etc/bacula/bweb.conf',
95 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
105 'device' => '/dev/changer',
111 'mtxcmd' => '/usr/sbin/mtx',
117 }, 'Bweb::Autochanger' )
120 'template_dir' => '/usr/share/bweb/tpl',
121 'dbi' => 'DBI:mysql:database=bacula',
125 'email_media' => 'eric@localhost'
129 ################ BRESTORE ######################################
131 If you want to use brestore with bweb, you must associate mime type
132 text/brestore with your brestore.pl.
134 ################ POSTGRESQL NOTES ##############################
136 If you think that Mysql is not a great database (or just a toy), you must add
137 function to the Postgresql bacula database to get Bweb works.
139 psql -u bacula bacula < script/bweb-postgresql.sql
141 ################ BCONSOLE NOTES ################################
143 You must use bconsole without conio/readline support. For that, use
146 ################ BACULA LOG ####################################
148 To use Bweb log engine you MUST use catalog message type.
153 operator = root@localhost = mount
154 console = all, !skipped, !saved
155 append = "/tmp/bacula/var/bacula/working/log" = all, !skipped
157 catalog = all, !skipped, !saved
161 ################ BWEB LIMITATION ###############################
163 To get bweb working, you must follow these rules
164 - Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
165 - AutoChanger name must be same as Device and Location name in bacula
167 ################ SUDO CONFIGURATION ############################
169 If you use sudo, put this on you /etc/sudoers
171 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
172 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
173 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
174 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
176 ################ BFILEVIEW SETUP ###############################
178 At this time, bfileview works only with postgresql.
180 Alias /bweb/fv /var/spool/bweb
181 <Directory "/var/spool/bweb">
183 AllowOverride AuthConfig
188 mkdir /var/spool/bweb
189 chmod 700 /var/spool/bweb
190 chown www-data /var/spool/bweb
192 You have to remove "<!-- Remove this to activate bfileview" and "-->" from
193 tpl/display_job_zoom.tpl.
195 You must use brestore.pl -b to initialise the database, and
196 you can use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size.
198 At this time, it's a good idea to schedule brestore.pl -b after your
202 Name = "BackupCatalog"
204 # This creates an ASCII copy of the catalog
205 RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula Pei0ahm9"
206 # This deletes the copy of the catalog
207 RunAfterJob = "/opt/bacula/etc/delete_catalog_backup"
208 RunAfterJob = "/usr/local/bin/brestore.pl -b"
211 To upgrade from an old installation, you can use :
212 ALTER TABLE brestore_pathvisibility ADD Size int8;