1 ################################################################
3 ################################################################
5 Bweb works well with 1.39 release or later.
9 3) intialise your configuration file
10 4) do some sql stuff (for postgresql users)
11 5) use the -n option on bconsole so that it works with Expect
12 6) get bacula log more useful
14 8) using sudo with autochanger
18 ################ FILE COPY #####################################
19 # you must get bweb cvs files
20 cvs -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula login
21 cvs -z3 -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula co -P gui
24 # or get them from the released tar files or from the apt or rpms.
26 # first, copy the bweb perl library into your PERL5 INC path
27 install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
29 # copy the bweb perl program to your cgi location
30 mkdir -m 755 /usr/lib/cgi-bin/bweb
31 install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
34 mkdir -m 755 /etc/bacula
35 chown root:bacula /etc/bacula
36 echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf
37 chown www-data /etc/bacula/bweb.conf
39 # copy the bweb template file
40 mkdir -p /usr/share/bweb/tpl
41 install -m 644 -o root -g root bweb/tpl/*.tpl /usr/share/bweb/tpl
43 # copy the bweb graphics elements (bweb elements must reside in /bweb)
45 install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
49 WARNING : Your www-data user must be able to execute bconsole and able
50 to read the bconsole.conf file!
51 You can create an bconsole group for that.
53 ################ USE FRENCH VERSION ############################
55 Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl
57 ################ INSTALL PERL LIBRARY ##########################
60 - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
68 You can install perl modules with CPAN
72 Or use your distribution
73 apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl
74 apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
76 ################ APACHE CONFIGURATION ##########################
78 It could be a good idea to protect your bweb installation.
80 Put this in your httpd.conf, and add user with htpasswd
82 <Directory /usr/lib/cgi-bin/bweb>
83 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
85 AuthName MyPrivateFile
86 AuthUserFile /etc/apache/htpasswd
92 ################ CONFIGURATION #################################
94 /etc/bacula/bweb.conf looks like : (you can edit it inside bweb)
96 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
98 'config_file' => '/etc/bacula/bweb.conf',
99 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
109 'device' => '/dev/changer',
115 'mtxcmd' => '/usr/sbin/mtx',
121 }, 'Bweb::Autochanger' )
124 'template_dir' => '/usr/share/bweb/tpl',
125 'dbi' => 'DBI:mysql:database=bacula',
129 'email_media' => 'eric@localhost'
133 ################ BRESTORE ######################################
135 If you want to use brestore with bweb, you must associate a mime type
136 text/brestore with your brestore.pl.
138 ################ POSTGRESQL NOTES ##############################
140 If you want to use PostgreSQL instead of MySQL, you must add
141 a function to the PostgreSQL Bacula database to get Bweb to work.
143 psql -u bacula bacula < script/bweb-postgresql.sql
145 ################ BCONSOLE NOTES ################################
147 You must use bconsole without conio/readline support. For that, use
148 the bconsole -n option.
150 ################ BACULA LOG ####################################
152 To use Bweb log engine you MUST use catalog message type.
157 operator = root@localhost = mount
158 console = all, !skipped, !saved
159 append = "/tmp/bacula/var/bacula/working/log" = all, !skipped
161 catalog = all, !skipped, !saved
165 ################ BWEB LIMITATION ###############################
167 To get bweb working, you must follow these rules
168 - Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
169 - AutoChanger name must be same as Device and Location name in bacula
171 ################ SUDO CONFIGURATION ############################
173 If you use sudo, put this on you /etc/sudoers
175 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
176 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
177 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
178 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
180 ################ BFILEVIEW SETUP ###############################
182 At this time, bfileview works only with PostgreSQL.
184 Alias /bweb/fv /var/spool/bweb
185 <Directory "/var/spool/bweb">
187 AllowOverride AuthConfig
192 mkdir /var/spool/bweb
193 chmod 700 /var/spool/bweb
194 chown www-data /var/spool/bweb
196 You have to remove "<!-- Remove this to activate bfileview" and "-->" from
197 tpl/display_job_zoom.tpl.
199 You must use brestore.pl -b to initialise the database, and
200 you can use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size.
202 At this time, it's a good idea to schedule brestore.pl -b after your
206 Name = "BackupCatalog"
208 # This creates an ASCII copy of the catalog
209 RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula Pei0ahm9"
210 # This deletes the copy of the catalog
211 RunAfterJob = "/opt/bacula/etc/delete_catalog_backup"
212 RunAfterJob = "/usr/local/bin/brestore.pl -b"
215 To upgrade from an old installation, you can use :
216 ALTER TABLE brestore_pathvisibility ADD Size int8;
218 ################ ACCESSING TO BWEB ###############################
220 Now, you are able to launch firefox/mozilla and go on
221 http://your-server/bweb