DOWNLOAD AND INSTALL BACULA
Download bacula and extract it :
wget http://sourceforge.net/projects/bacula/files/bacula/5.0.2/bacula-5.0.2.tar.gz/download
tar -zxf bacula-5.0.2.tar.gz
cd bacula-5.0.2
Configure Bacula for compiling :
CFLAGS="-g -Wall" \
./configure \
--sbindir=/usr/share/bacula/bin \
--sysconfdir=/usr/share/bacula/etc \
--with-pid-dir=/usr/share/bacula/bin/working \
--with-subsys-dir=/usr/share/bacula/bin/working \
--with-working-dir=/usr/share/bacula/bin/working \
--enable-client-only
Compile and install bacula :
make
make install
CONFIGURE SYSTEM FOR AUTOMATIC STARTUP
Copy the start-stop script from /usr/share/bacula/bin to /etc/init.d
cp /usr/share/bacula/bin/bacula /etc/init.d
cp /usr/share/bacula/bin/bacula-fd /etc/init.d
Modify the bacula startup script(/etc/init.d/bacula) , adding this line at the top (so the bacula init script is chkconfig compatible) :
# chkconfig: - 87 26
NOTE : The script modified need to be something like thisRun the following command :
#! /bin/sh
# chkconfig: - 87 26
#
# bacula This shell script takes care of starting and stopping
# the bacula daemons.
#
# This is pretty much watered down version of the RedHat script
# that works on Solaris as well as Linux, but it won't work everywhere.
#
# description: It comes by night and sucks the vital essence from your computers.
chkconfig bacula on
service bacula start
CONFIGURE THE FIREWALL
Configure the firewall to permit access to webmin server (suppose the default config with https port on 10000) by editing /etc/sysconfig/iptables config file. Add a line like this before the REJECT line :
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9102 -j ACCEPT
Restart the firewall
service iptables restart
CONFIGURE BACULA
Go to /usr/share/bacula/etc and edit (vi) bacula-fd.conf
Find the first entry Director and then, after the Name directive, put an Address directive with the IP of the bacula server or with the fqdn of bacula server
Address = XXX.XXX.XXX.XXX
or
Address = fully.qualified.domain.name
Comment out the second Director entry, leave the FileDaemon unchanged
Modify the Messages section to point to the bacula server.
#director = bacula-client.yyyyyy.it-dir = all, !skipped, !restored
director = bacula-srv.yyyyyy.it-dir = all, !skipped, !restored
This is an example of the bacula-fd configure script working :
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 5.0.2 (28 April 2010) -- redhat
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = bacula-srv.xxxxx.it-dir
Address = XXX.XXX.XXX.XXX
Password = "RANDOM PASSWORD"
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = bacula-client.xxxxxx.it-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /usr/share/bacula/bin/working
Pid Directory = /usr/share/bacula/bin/working
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-srv.xxxxxx.it-dir = all, !skipped, !restored
}
CONFIGURE THE BACULA SERVER WITH bacula-dir.conf
Now, we need to check in the bacula server the definition of the Storage Device.
Look at the Address directive … change it from localhost to the ip address of the NIC (or the fqdn of the server)
Address = XXX.XXX.XXX.XXX
or
Address = fully.qualified.domain.name
ADDING A CLIENT ON THE BACULA SERVER
Restart the bacula both on Server and Client machine
service bacula restart
Via WebMin, add a new backup client, please make sure to use the password in the bacula-fd.conf file of the client.
REFERENCES
http://www.crippaandrea.it/?p=771