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
30 install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
32 # copy the bweb perl program to your cgi location
33 mkdir -m 755 /usr/lib/cgi-bin/bweb
34 install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
37 mkdir -m 755 /etc/bacula
38 chown root:bacula /etc/bacula
39 echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf
40 chown www-data /etc/bacula/bweb.conf
42 # copy the bweb template file
43 mkdir -p /usr/share/bweb/tpl
44 install -m 644 -o root -g root bweb/tpl/*.tpl /usr/share/bweb/tpl
46 # copy the bweb graphics elements (bweb elements must reside in /bweb)
48 install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
52 WARNING : Your www-data user must be able to execute bconsole and able
53 to read the bconsole.conf file!
54 You can create an bconsole group for that.
56 ################ USE FRENCH VERSION ############################
58 Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl
60 ################ INSTALL PERL LIBRARY ##########################
63 - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
71 You can install perl modules with CPAN
75 Or use your distribution
76 apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl
77 apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
79 ################ APACHE CONFIGURATION ##########################
81 It could be a good idea to protect your bweb installation.
83 Put this in your httpd.conf, and add user with htpasswd
85 <Directory /usr/lib/cgi-bin/bweb>
86 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
88 AuthName MyPrivateFile
89 AuthUserFile /etc/apache/htpasswd
95 ################ CONFIGURATION #################################
97 /etc/bacula/bweb.conf looks like : (you can edit it inside bweb)
99 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
101 'config_file' => '/etc/bacula/bweb.conf',
102 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
112 'device' => '/dev/changer',
118 'mtxcmd' => '/usr/sbin/mtx',
124 }, 'Bweb::Autochanger' )
127 'template_dir' => '/usr/share/bweb/tpl',
128 'dbi' => 'DBI:mysql:database=bacula',
132 'email_media' => 'eric@localhost'
136 ################ BRESTORE ######################################
138 If you want to use brestore with bweb, you must associate a mime type
139 text/brestore with your brestore.pl.
141 ################ POSTGRESQL NOTES ##############################
143 If you want to use PostgreSQL instead of MySQL, you must add
144 a function to the PostgreSQL Bacula database to get Bweb to work.
146 psql -u bacula bacula < script/bweb-postgresql.sql
148 ################ BCONSOLE NOTES ################################
150 You must use bconsole without conio/readline support. For that, use
151 the bconsole -n option.
153 ################ BACULA LOG ####################################
155 To use Bweb log engine you MUST use catalog message type.
160 operator = root@localhost = mount
161 console = all, !skipped, !saved
162 append = "/tmp/bacula/var/bacula/working/log" = all, !skipped
164 catalog = all, !skipped, !saved
168 ################ BWEB LIMITATION ###############################
170 To get bweb working, you must follow these rules
171 - Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
172 - AutoChanger name must be same as Device and Location name in bacula
174 ################ SUDO CONFIGURATION ############################
176 If you use sudo, put this on you /etc/sudoers
178 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
179 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
180 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
181 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
183 ################ BFILEVIEW SETUP ###############################
185 At this time, bfileview works only with PostgreSQL.
187 Alias /bweb/fv /var/spool/bweb
188 <Directory "/var/spool/bweb">
190 AllowOverride AuthConfig
195 mkdir /var/spool/bweb
196 chmod 700 /var/spool/bweb
197 chown www-data /var/spool/bweb
199 You have to remove "<!-- Remove this to activate bfileview" and "-->" from
200 tpl/display_job_zoom.tpl.
202 You must use brestore.pl -b to initialise the database, and
203 you can use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size.
205 At this time, it's a good idea to schedule brestore.pl -b after your
209 Name = "BackupCatalog"
211 # This creates an ASCII copy of the catalog
212 RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula Pei0ahm9"
213 # This deletes the copy of the catalog
214 RunAfterJob = "/opt/bacula/etc/delete_catalog_backup"
215 RunAfterJob = "/usr/local/bin/brestore.pl -b"
218 To upgrade from an old installation, you can use :
219 ALTER TABLE brestore_pathvisibility ADD Size int8;
220 ALTER TABLE brestore_pathvisibility ADD Files int4;
222 ################ ACCESSING TO BWEB ###############################
224 Now, you are able to launch firefox/mozilla and go on
225 http://your-server/bweb