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
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 # or get them from the released tar files or from the apt or rpms.
25 # first, copy the bweb perl library into your PERL5 INC path
26 install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
28 # copy the bweb perl program to your cgi location
29 mkdir -m 755 /usr/lib/cgi-bin/bweb
30 install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
33 mkdir -m 755 /etc/bacula
34 chown root:bacula /etc/bacula
35 echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf
36 chown www-data /etc/bacula/bweb.conf
38 # copy the bweb template file
39 mkdir -p /usr/share/bweb/tpl
40 install -m 644 -o root -g root bweb/tpl/*.tpl /usr/share/bweb/tpl
42 # copy the bweb graphics elements (bweb elements must reside in /bweb)
44 install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
48 WARNING : Your www-data user must be able to execute bconsole and able
49 to read the bconsole.conf file!
50 You can create an bconsole group for that.
52 ################ USE FRENCH VERSION ############################
54 Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl
56 ################ INSTALL PERL LIBRARY ##########################
59 - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
67 You can install perl modules with CPAN
71 Or use your distribution
72 apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl
73 apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
75 ################ APACHE CONFIGURATION ##########################
77 It could be a good idea to protect your bweb installation.
79 Put this in your httpd.conf, and add user with htpasswd
81 <Directory /usr/lib/cgi-bin/bweb>
82 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
84 AuthName MyPrivateFile
85 AuthUserFile /etc/apache/htpasswd
91 ################ CONFIGURATION #################################
93 /etc/bacula/bweb.conf looks like : (you can edit it inside bweb)
95 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
97 'config_file' => '/etc/bacula/bweb.conf',
98 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
108 'device' => '/dev/changer',
114 'mtxcmd' => '/usr/sbin/mtx',
120 }, 'Bweb::Autochanger' )
123 'template_dir' => '/usr/share/bweb/tpl',
124 'dbi' => 'DBI:mysql:database=bacula',
128 'email_media' => 'eric@localhost'
132 ################ BRESTORE ######################################
134 If you want to use brestore with bweb, you must associate a mime type
135 text/brestore with your brestore.pl.
137 ################ POSTGRESQL NOTES ##############################
139 If you want to use PostgreSQL instead of MySQL, you must add
140 a function to the PostgreSQL Bacula database to get Bweb to work.
142 psql -u bacula bacula < script/bweb-postgresql.sql
144 ################ BCONSOLE NOTES ################################
146 You must use bconsole without conio/readline support. For that, use
147 the bconsole -n option.
149 ################ BACULA LOG ####################################
151 To use Bweb log engine you MUST use catalog message type.
156 operator = root@localhost = mount
157 console = all, !skipped, !saved
158 append = "/tmp/bacula/var/bacula/working/log" = all, !skipped
160 catalog = all, !skipped, !saved
164 ################ BWEB LIMITATION ###############################
166 To get bweb working, you must follow these rules
167 - Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
168 - AutoChanger name must be same as Device and Location name in bacula
170 ################ SUDO CONFIGURATION ############################
172 If you use sudo, put this on you /etc/sudoers
174 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
175 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
176 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
177 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
179 ################ BFILEVIEW SETUP ###############################
181 At this time, bfileview works only with PostgreSQL.
183 Alias /bweb/fv /var/spool/bweb
184 <Directory "/var/spool/bweb">
186 AllowOverride AuthConfig
191 mkdir /var/spool/bweb
192 chmod 700 /var/spool/bweb
193 chown www-data /var/spool/bweb
195 You have to remove "<!-- Remove this to activate bfileview" and "-->" from
196 tpl/display_job_zoom.tpl.
198 You must use brestore.pl -b to initialise the database, and
199 you can use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size.
201 At this time, it's a good idea to schedule brestore.pl -b after your
205 Name = "BackupCatalog"
207 # This creates an ASCII copy of the catalog
208 RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula Pei0ahm9"
209 # This deletes the copy of the catalog
210 RunAfterJob = "/opt/bacula/etc/delete_catalog_backup"
211 RunAfterJob = "/usr/local/bin/brestore.pl -b"
214 To upgrade from an old installation, you can use :
215 ALTER TABLE brestore_pathvisibility ADD Size int8;