Crippa Andrea

Tag: Bacula

Installing and Configuring Bacula Client 5.0.2 on a Centos 5.4 machine

This entry was posted by admin ( Crippa Andrea ) on 2 May 2010 at 6:11 PM and have got 492 reads . It's field under Linux and tagged , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

For the instalation of the Bacula Server, please refer to THIS post.

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 this
#! /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.

Run the following command :
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.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Leave a Comment :, , , more...

Installing Bacula 5.0.2 on Centos 5.4 using VMWARE with MySQL support and WebMin Gui

This entry was posted by admin ( Crippa Andrea ) on 2 May 2010 at 10:43 AM and have got 1117 reads . It's field under Linux and tagged , , , , , , , , , , , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Configure the Virtual Environment

1) – Create a Virtual Machine as Red Hat Linux 5
2) – Remove the Default Ethernet Adapter
3) – Add a new adapter as VMXNET3 (feel free to use a dedicated adapter for the LAN Backup function and an other one for the remote connectivity to the Virtual Machine)

Note : You may prefer to create a Virtual Machine with 2 ethernet adapter : The first one for the Remote Access (aka SSH) and the other one on a dedicate VLAN for the LAN BACKUP FUNCTION.

Create the BASE SYSTEM

Install Centos 5.4. During the installation, please DESELECT :
– Desktop : gnome
Flag the checkbox to “customize now” , and then select Under DEVELOPMENT :
– Development Library
– Development Tool
– Legacy Software Develpment
Select Under BASE SYSTEM
– Legacy Software Support

INSTALL AND CONFIGURE VMWARE TOOL
– Start the VMWare Tool Install
– Mount the Virtual CDROM
– Copy the .tar.gz file in /tmp
– Umount the CDROM
– Extract the tarball (tar -zxf) and execute it (./vmware-install.pl)

At the end of the installation, run the following command :
kudzu
service network restart

– Adjust the network ettings using /etc/sysconfig/network-scripts/ifcfg-eth0 as you prefer

INSTALL THE DATABASE SERVER
To install the database , you need to :
yum install mysql-server
yum install mysql-devel.i386

NOTE : You can install mysql during the installation of the OS, in this case simply install mysql-devel.i386

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

Configura Bacula for compiling (please note that u have to change the email settings) :
CFLAGS="-g -Wall" \
./configure \
--sbindir=$HOME/bacula/bin \
--sysconfdir=$HOME/bacula/bin \
--with-pid-dir=$HOME/bacula/bin/working \
--with-subsys-dir=$HOME/bacula/bin/working \
--with-mysql \
--with-working-dir=$HOME/bacula/bin/working \
--with-dump-email=your@address.com \
--with-job-email=your@address.com \
--with-smtp-host=localhost

NOTE : My default installation setup is the following :

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-mysql \
--with-working-dir=/usr/share/bacula/bin/working \
--with-dump-email=x@y.it \
--with-job-email=x@y.it \
--with-smtp-host=XXX.XXX.XXX.XXX

Compile and install bacula :
make
make install

CREATE DEFAULT DATABASE FOR BACULA
service mysqld start

Go in /usr/share/bacula/etc and execute the following script
./grant_mysql_privileges
./create_mysql_database
./make_mysql_tables

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-sd /etc/init.d
cp /usr/share/bacula/bin/bacula-fd /etc/init.d
cp /usr/share/bacula/bin/bacula-dir /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 this
#! /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.

Run the following command :
chkconfig mysqld on
chkconfig bacula on
service bacula start

DOWNLOAD AND START WEBMIN
Download the webmin software :
cd /tmp
wget http://downloads.sourceforge.net/project/webadmin/webmin/1.510/webmin-1.510.tar.gz?use_mirror=heanet

Install Perl-Net-SSL if you plan to use SSL for connecting to webmin :
yum install perl-Net-SSLeay.i386

Extract WebMin from the tarball and install it :
tar -zxf webmin-1.510.tar.gz
cd webmin-1.510

Run setup script :
./setup.sh

NOTE : The default settings must be fine, simply specify you login password.

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 9101 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9102 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9103 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT

Restart the firewall
service iptables restart

CONFIGURE WEBMIN
Login to your WebMin Server , and fill the search box with the word “bacula”
Click the first result, and change go to change the module config.
- Change Database type to MySql
- Change config dir to /usr/share/bacula/etc

Congratulation …. you have succesfully installed bacula with mysql support and WebMin access

VN:F [1.9.3_1094]
Rating: 9.0/10 (4 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
5 Comments :, , , , , , , , , , , , , more...

Instaling Bacula 5.0.0 on Centos 5.4 x86_64

This entry was posted by admin ( Crippa Andrea ) on 4 February 2010 at 11:32 PM and have got 525 reads . It's field under Linux and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

I just give a try installing Bacula 5.0.0 with my previus guide for Bacula 3.0.3 and it seems it works. I’ve also tested the installation on a X86_64 base system with success.

The guide for installing bacula is here

NOTE : For x86_64 install, please when installing mysql-devel use this command :
yum install mysql-devel

VN:F [1.9.3_1094]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
2 Comments :, , more...