################################################################
#             brestore -- a bacula perl interface              #
################################################################

As we felt a need for a restoration GUI for bacula, we developed a simple
Perl/GTK GUI.  
It has the following features :

    * Direct SQL access to the database for good performance

    * Fast Time Navigation (switch almost instantaneously between the different
      versions of a directory, by changing the date from a list)

    * Possibility to choose a selected file, then browse all its available
      versions, and see directly if these versions are online in a library or
      not

    * Simple restoration by the generation of a BSR file

    * Works indifferently with postgresql and mysql 

We have a working (if a bit unpolished) version ready, and think it is time for
us to publish it and have user and Kern feedback.  

What's missing :

    * We want to add some other features such as : the user has selected a FD
      and a date, we want to display the list of media requested and their
      availability.

    * Plenty of features. As we don't have lots of imagination. Don't hesitate
      to suggest us your ideas ...

    * We want use bacula to generate bsr files, at this time, you can't restore
      files across different Storage (Full on tape, Incr on Disk for example)

For the moment, we want to concentrate on having a restoration interface. We
don't care about seeing the restoration progress, or anything else.

These tools are available with Bweb.

################ INSTALL #######################################

# you can put glade file on /usr/share/brestore or /usr/local/share/brestore
mkdir -p /usr/share/brestore
install -m 644 -o root -g root brestore.glade /usr/share/brestore
install -m 755 -o root -g root brestore.pl    /usr/bin

# if you doesn't use bweb and bconsole.pl
# you must get Bconsole.pm from bweb modules (bweb/lib/Bconsole.pm)

install -m 644 -o root -g root Bconsole.pm /usr/share/perl5

# copy bsr file directly to your director, use must use scp (or nfs stuff)
# if you doesn't want to use this, you can dump the bsr file with "Gen BSR" button.
# so you must have an ssh-key exchange. (you can also hack brestore.pl to use 
# something like '$err = `xterm -e scp $src $1 2>&1`'

your_login@yourws:~$ ssh-copy-id -i .ssh/your_pub_key login@bacula-dir

# you have to configure brestore preferences.

################ WINDOWS INSTALL ###############################

Brestore works on win32 with ActivePerl. To get all libraries, you
can install GCSTAR. You have also to copy libglade-2.0.dll

################ INSTALL MODULES ###############################

Perl Modules
The Debian Way

apt-get install libgtk2-gladexml-perl
apt-get install libdbd-mysql-perl
apt-get install libdbd-pg-perl
apt-get install libexpect-perl
apt-get install libwww-perl

The Red Hat way
Please contribute, neither of us have a Red Hat to test on :)
Other distros/Unices
Please contribute ...
The generic Way, if those modules aren't packaged by your distro

perl -MCPAN -e shell
install Gtk2
install Expect
install Gtk2::GladeXML
install LWP

install DBD::mysql
or
install DBD::Pg

################ BCONSOLE WITHOUT CONIO ########################

If you doesn't use Bweb, you must use bconsole without conio support. For that, use
bconsole -n option.

WARNING : You must be able to execute bconsole and able to read bconsole.conf !

################ CONFIGURATION #################################

You can make configuration from brestore himself (if brestore can't find
his glade file).

Example :

$parameters = {
                'mozilla' => 'mozilla',
                'bconsole' => '/usr/local/bin/bconsole.noconio -c /etc/bacula/bconsole.conf',
                'bweb' => 'http://localhost/cgi-bin/bweb/bweb.pl',
                'connection_string' => 'DBI:mysql:database=bacula;host=127.0.0.1;port=3306',
                'username' => 'bacula',
                'password' => 'xxxx',
                'bsr_dest' => 'file://var/tmp',
                'debug' => 0,
                'use_ok_bkp_only' => 1,
                'default_restore_job' => 'restore'
              };
