# get a config file
mkdir -m 750 /etc/bweb
chown root:www-data /etc/bweb
- echo "template_dir = /usr/share/bweb/tpl" > /etc/bweb/config
+ echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bweb/config
chown www-data /etc/bweb/config
# copy bweb template file
# copy bweb graphics elements (bweb elements must reside on /bweb)
mkdir /var/www/bweb
- install -m 644 -o root -g root bweb/html/*.{js,png,css,gif} /var/www/bweb
+ install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
# done !
+ WARNING : Your www-data user must be able to execute bconsole and able to read bconsole.conf !
+ You can create an bconsole group for that.
+
################ INSTALL PERL LIBRARY ##########################
- perl modules
################ CONFIGURATION #################################
/etc/bweb/config looks like : (you can edit it inside bweb)
+$VAR1 = bless( {
+ 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
+ 'name' => undef,
+ 'config_file' => '/etc/bweb/config',
+ 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
+ 'ach_list' => {
+ 'S1_L80' => bless( {
+ 'info' => {
+ 'drive' => 0,
+ 'io' => 0,
+ 'slot' => 0
+ },
+ 'name' => 'S1_L80',
+ 'bweb' => undef,
+ 'device' => '/dev/changer',
+ 'drive' => [],
+ 'debug' => 0,
+ 'label' => {},
+ 'precmd' => 'sudo',
+ 'io' => [],
+ 'mtxcmd' => '/usr/sbin/mtx',
+ 'drive_name' => [
+ 'S1_L80_SDLT0',
+ 'S1_L80_SDLT1'
+ ],
+ 'slot' => []
+ }, 'Bweb::Autochanger' )
+ },
+ 'password' => 'xxx',
+ 'template_dir' => '/usr/share/bweb/tpl',
+ 'dbi' => 'DBI:mysql:database=bacula',
+ 'error' => '',
+ 'debug' => 0,
+ 'user' => 'bacula',
+ 'email_media' => 'eric@localhost'
+}, 'Bweb::Config' );
-dbi = DBI:Pg:database=bacula;host=192.168.1.2
-user = bacula
-password = test
-template_dir = /usr/share/bweb/tpl
-graph_font = /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
-email_media = eric@localhost
-bconsole = /usr/local/bacula/sbin/bconsole -c /usr/local/bacula/etc/bconsole.conf
################ BRESTORE ######################################
################ BCONSOLE NOTES ################################
-You must use bconsole without conio/readline support ! You can have 2 bconsole
-binary at the same time.
-
-./configure <your-other-options> --disable-conio
-cd src/lib
-make
-cd ..
-cd console
-make
-cp bconsole <your_destination>
+You must use bconsole without conio/readline support. For that, use
+bconsole -n option.
################ BACULA LOG ####################################
new Log table in your database.
After, you can fill your database with :
-tail -f /tmp/log.sql | bacula -u bacula bacula
+while true; do
+ tail -f /tmp/log.sql | bacula -u bacula bacula
+done
cd bacula-src
-patch < message.patch
+patch -p1 < message.patch
--- cvs/src/lib/message.c 2006-07-27 21:06:20.000000000 +0200
+++ cvs/src/lib/message.c.director 2006-07-28 13:46:49.171083494 +0200
@@ -716,6 +716,18 @@
Dmsg1(850, "DIRECTOR for following msg: %s", msg);
-
+This patch is only for director, this will breaks the rest.
+you can revert it with patch -p1 -R < message.patch
################ BWEB LIMITATION ###############################
To get bweb working, you must follow these rules
- Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
- - AutoChanger name must be same as Storage name device in bacula
+ - AutoChanger name must be same as Device and Location name in bacula
################ SUDO CONFIGURATION ############################
-*** At this time, autochanger module works only at home :)
-
If you use sudo, put this on you /etc/sudoers
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *