# INSTALL NOTES #
################################################################
-Bweb works well with 2.0 release or later.
+Bweb works well with 3.0 release or later.
1) install Perl lib
-2) copy your files
-3) initialize your configuration file
-4) do some sql stuff (for postgresql or mysql 5 users)
-5) use the -n option on bconsole so that it works with Expect
-6) get bacula log more useful
-7) bweb limitation
-8) using sudo with autochanger
-9) using bfileview.pl
-10) accessing to bweb
-11) setting mysql read-only account
-12) get more statistics
-13) use users and groups with bweb
-14) setup restoration in bweb
-
-################ FILE COPY #####################################
+2) using lighttpd (quick install)
+3) using apache
+4) initialize your configuration file
+5) do some sql stuff (for postgresql or mysql 5 users)
+6) use the -n option on bconsole so that it works with Expect
+7) get bacula log more useful
+8) bweb limitation
+9) using sudo with autochanger
+10) using bfileview.pl
+11) accessing to bweb
+12) setting mysql read-only account
+13) get more statistics
+14) use users and groups with bweb
+15) setup restoration in bweb
+
+
+################ INSTALL PERL LIBRARY ##########################
+
+ - perl modules
+ - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
+ (SQLite is not supported)
+ - GD::Graph
+ - GD
+ - HTML::Template
+ - CGI
+ - Expect
+ - Time::ParseDate
+ - Date::Calc
+
+ You can install perl modules with CPAN
+ perl -e shell -MCPAN
+ > install Expect
+
+ Or use your distribution
+ apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl \
+ libdbd-mysql-perl libdbd-pg-perl libdbi-perl \
+ libdate-calc-perl libtime-modules-perl
+
+ Note: the best way to test if you have all the dependencies
+ fullfilled for Perl is to:
+
+ cd bweb/lib
+ ../cgi/bweb.pl
+
+ you might also want to try:
+
+ ../cgi/bgraph.pl
+
+ To make sure the graphing modules are loaded. However, running it
+ will spray binary graphics data on your terminal. Otherwise, you will
+ get an error.
+
+ That should show you if any of the pre-requisites are missing.
+ On SuSE 10.2, I was able to load all the appropriate modules via rpms,
+ with the exception of Expect and Time::ParseDate, which I loaded manually
+ using perl.
+
+ If you experience problems, always consult the Apache error_log
+ file.
+
+
+################# USE LIGHTTPD WITH BWEB #######################
+
+In this example, bweb files are in /home/bacula/bweb
+You should have installed lighttpd.
+
+bacula:~$ cd bweb
+
+# configure the database
+bacula:~/bweb$ mysql bacula < script/bweb-mysql.sql
+# or
+bacula:~/bweb$ psql bacula < script/bweb-postgresql.sql
+
+# You can start the web server from the bweb directory
+bacula@localhost:~/bweb$ ./script/starthttp
+ Making configuration template in /home/bacula/bweb/bweb.conf
+ Adjusting bweb.conf path
+ Using bweb on /home/bacula/bweb, use firefox http://localhost:9180
+ 2009-07-18 22:23:12: (log.c.75) server started
+
+
+By default, only the loopback interface is binded, you can change that
+in the bweb/script/httpd.conf file.
+
+You will have to configure bweb with your database and bconsole info, it
+can be done in the web interface.
+
+I [Kern] used the following in the Configuration panel. Note: I am
+ using Ubuntu Hardy (8.04):
+DBI: DBI:mysql:database=bacula;host=roxie
+user: bacula
+Password: (nothing -- I have none)
+email_media: my@email.com
+bconsole: /opt/bacula/bin/bconsole -n
+
+Click: Save
+Click: Main -- you should see the charts
+
+
+################ FILE COPY (Full Apache methode) ###############
# you must get bweb svn files
svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula/trunk/gui/bweb bweb
# or
install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
+
+
# copy the bweb perl program to your cgi location
mkdir -m 755 /usr/lib/cgi-bin/bweb
install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
Simply copy lang/fr/tpl/*.tpl files to .../tpl/fr/*.tpl and choose
your language in the configuration panel.
-################ INSTALL PERL LIBRARY ##########################
-
- - perl modules
- - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
- (SQLite is not supported)
- - GD::Graph
- - GD
- - HTML::Template
- - CGI
- - Expect
- - Time::ParseDate
- - Date::Calc
-
- You can install perl modules with CPAN
- perl -e shell -MCPAN
- > install Expect
-
- Or use your distribution
- apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl \
- libdbd-mysql-perl libdbd-pg-perl libdbi-perl \
- libdate-calc-perl libtime-modules-perl
-
- Note: the best way to test if you have all the dependencies
- fullfilled for Perl is to:
-
- cd /var/www/cgi-bin/bweb
- ./bweb.pl
-
- you might also want to try:
-
- ./bgraph.pl
-
- To make sure the graphing modules are loaded. However, running it
- will spray binary graphics data on your terminal. Otherwise, you will
- get an error.
-
- That should show you if any of the pre-requisites are missing.
- On SuSE 10.2, I was able to load all the appropriate modules via rpms,
- with the exception of Expect and Time::ParseDate, which I loaded manually
- using perl.
-
- If you experience problems, always consult the Apache error_log
- file.
################ APACHE CONFIGURATION ##########################
Put this in your httpd.conf, and add user with htpasswd
+Alias /bweb /usr/share/bweb/html
+<Directory /usr/share/bweb/html>
+ Options FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+</Directory>
+
+ScriptAlias /cgi-bin/bweb /usr/lib/cgi-bin/bweb
<Directory /usr/lib/cgi-bin/bweb>
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
AuthType Basic
# with mysql < 5, you have to play with the ugly SHOW command
DB_SIZE => " SELECT 0 ",
# works only with mysql 5
- # DB_SIZE => " SELECT sum(DATA_LENGTH) FROM INFORMATION_SCHEMA.TABLES ",
+ DB_SIZE => " SELECT sum(DATA_LENGTH) FROM INFORMATION_SCHEMA.TABLES ",
################ BCONSOLE NOTES ################################
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
-################ BFILEVIEW SETUP ###############################
-
-At this time, bfileview works only with PostgreSQL.
+################ BFILEVIEW AND BTIME SETUP ###############################
Alias /bweb/fv /var/spool/bweb
<Directory "/var/spool/bweb">
chmod 700 /var/spool/bweb
chown www-data /var/spool/bweb
-You have to remove "<!-- Remove this to activate bfileview" and "-->" from
-tpl/en/display_job_zoom.tpl.
-
Add (or configure) a writable location to the parameters in bweb.conf
'fv_write_path' => '/var/spool/bweb',
-You MUST use brestore.pl -b or bresto.pl action=batch to initialize the database, and
-you CAN use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size.
+###### BFILEVIEW only part
+
+You MUST use brestore.pl -b or bresto.pl action=batch to initialize the
+database, and you CAN use bfileview.pl mode=batch jobid=xxx where=/ to compute
+tree size.
At this time, it's a good idea to schedule brestore.pl -b after your
BackupCatalog job.
Name = "BackupCatalog"
...
# This creates an ASCII copy of the catalog
- RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula Pei0ahm9"
+ RunBeforeJob = "/opt/bacula/etc/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
RunAfterJob = "/opt/bacula/etc/delete_catalog_backup"
RunAfterJob = "/usr/lib/cgi-bin/bweb/bresto.pl action=batch"
################ GET MORE STATISTICS ###########################
-You keep Jobs informations across retention into a JobHistory table.
-You have to setup stat_job_table = JobHistory in bweb configuration.
-
-CREATE TABLE JobHistory (LIKE Job);
+You keep Jobs informations across retention into a JobHisto table.
+You have to setup stat_job_table = JobHisto in bweb configuration.
-And run this on crontab when you want :
-INSERT INTO JobHistory
- (SELECT * FROM Job WHERE JobId NOT IN (SELECT JobId FROM JobHistory) );
+And use Statistics module from Bacula (see documentation and update stats
+command).
################ USE USERS AND GROUPS WITH BWEB ##########################
It will do some basics things on a working bweb/brestore setup.
-1) Go to http://extjs.com and download their toolkit (last 2.2 release)
+1) Go to http://extjs.com and download their toolkit (use the 2.2 release)
2) Install files in /bweb/ext web root
example on debian :
5) Use the last Bweb.pm
If you are trying bresto in a working bweb/brestore setup, you must make sure that you use
- the last Bweb.pm SVN version.
+ the last Bweb.pm git version.
6) Go on http://you-director/bweb/bresto.html