Filippo Zanardo's Blog

to blog or not to blog

XenServer 5.5 Tape Backup with Bacula

with 8 comments

Usually some of my customers use tape backup and i don’t want to use the iscsi trick, so i choose Bacula as my backup solution, i use it for about 2 or 3 years and it’s simple and stable and it works for me.

Basically you have to install some of the dependencies to be able to install Bacula, without compiling, first in your file:

/etc/yum.repos.d/Centos-Base.repo

enable all the respository setting enabled=1.
Next install this package with this command:

yum install qt4 qt4-devel qwt qwt-devel mtx mt-st mysql-server

Now start mysql:

service mysqld start

Ok now we have installed dependecies needed by bacula, now go to Sourceforge Bacula page and search for rpms-contrib-fschwarz i use bacula-mysql-3.0.2-1.el5.i386.rpm, go to download and copy the direct link for example:

http://downloads.sourceforge.net/project/bacula/rpms-contrib-fschwarz/3.0.2/bacula-mysql-3.0.2-1.el5.i386.rpm?use_mirror=freefr

Log in on ssh to the xenserver and execute this command:

wget http://downloads.sourceforge.net/project/bacula/rpms-contrib-fschwarz/3.0.2/bacula-mysql-3.0.2-1.el5.i386.rpm?use_mirror=freefr

Now in the current folder u download the bacula’s rpm, install with

rpm -ivh bacula…..

ok now bacula is installed, start the daemon and enable on startup:

service bacula-sd start
service bacula-fd start
chkconfig bacula-sd on
chkconfig bacula-fd on

Xenserver block port needed by bacula so stop iptables or execute this command:

iptables -A INPUT -p tcp –dport 9102 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 9102 -j ACCEPT
iptables -A INPUT -p tcp –dport 9103 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 9103 -j ACCEPT

usually i use director on a vm with webserver enabled so i can check the backup via bweb, so enable and start the director is not necessary. Now you have to modify the bacula’s config file now i put some example, modify to suite your needs.

File /etc/bacula/bacula-sd.conf

Storage { # definition of myself
Name = f10-64-build-sd
SDPort = 9103 # Director’s port
WorkingDirectory = “/var/lib/bacula”
Pid Directory = “/var/run”
Maximum Concurrent Jobs = 20
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = yourdirector-name
Password = “yourpassword”
}

Device {
Name = ULTRIUM #
Media Type = ULTRIUM
Archive Device = /dev/nst0 #the device where tape is attacched usually /dev/st0
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
}

file /etc/bacula/bacula-fd.conf

#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = yourdirector-name
Password = “yourpassword”
}

#
# “Global” File daemon configuration specifications
#
FileDaemon { # this is me
Name = f10-64-build-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}

The basic configuration for the storage daemon and the file daemon is done, now add them to your director and create a backup job.

Later i will post some about the director’s configuration and how to install the web interface (bweb).

If you have some question, comments or ask me.
Cheers!

Advertisements

Written by pipposan

February 4, 2010 at 19:02

8 Responses

Subscribe to comments with RSS.

  1. Hi Filippo, Actually in my organization we have storage NetAPP, Blades server: blades pool with Citrix Xen version community and other blades with native S.O. Also We have Library Tape Backup QualStar TLS 8466 abd a HP Rack with servers HP DL. I want to know what are the ways for installation Bacula director and storage daemon? what is the best localization, into virtual machines or outside in a physical server?

    Estela

    May 11, 2010 at 20:58

    • Hi,
      the storage daemon should installed where the tape drive is, so i install on the xenserver, the director can be installed in a vm or outside them, usually i install in a vm. Remember only to backup the catalog that is needed for speed up the recovery by the tape.
      If u have some more question ask me.

      pipposan

      May 12, 2010 at 09:30

      • Hi,
        Thanks for your answer,

        SAN NetApp has FC ports for connecting Tape Library and sure is necessary to use a software for backup data storage to Tape Library, but our university doesn`t have money for acquiring that.

        1. Bacula is able to connect to SAN NetApp (FCP is currently Protocol used) and backup data to Tape Library?

        2. Tape Library has a Port FC for control system unit, can be configure for storage daemon to control this robot?

        If Bacula can do last questions, i can resolve architecture: VM`s -> SAN -> Tape Library

        Now, we also have servers outside virtual machines environment (Native servers on rack blades and rack HP DL’s).

        3. In this environment where i put Storage daemon?, still XenCenter?

        Thanks again for your help.

        Estela Macías

        May 25, 2010 at 17:44

      • Hi,
        1. Of course bacula can connect to san netapp.
        2. If i understand correctly you have an autochanger? so check this out else i didn’t understand what you’re tryng to say
        Autochanger

        3. If your tape drive have fiber channel you can install storage daemon where you want, and then connect trough it, i usually install on xenserver cause my client have scsi tape devices

        You’re welcome if you have more question ask me.
        Bye

        pipposan

        May 26, 2010 at 12:56

  2. Hi again!

    We have servers with native software (not VM’s) but some one these don’t have FC connections.

    What’s your recomendation about that?

    1. Redirect remotely backup using ethernet connection to Backup server either physical or VM?

    2. This backup server can be Storage Daemon?

    Thanks!

    Estela Maacías

    May 31, 2010 at 18:08

    • Hi,
      1. yes of course

      2. ye basically in bacula you have a director (the master than connect many storage daemon, file daemon and schedule job), storage daemon (server where u write backup file or a resource connected to this machine), file daemon (server/s from you pick up the data)

      so on every server u can install and configure a storage or a file daemon and u keep a single director in another machine or whenever u like, the must is a connection between each other (TCP/IP,FC etc etc…).

      Cheers! Bye!

      pipposan

      May 31, 2010 at 18:18

  3. Thanks!

    I have other question:

    Into SAN NetApp there is 2 FC ports and our Library QualStar have 5 FC ports, one for Control Unit and 4 for Tape Drives, Which FC ports connect directly onboard SAN and/or FC ports Switch?

    Thanks again!

    Estela Maacías

    May 31, 2010 at 19:19

    • I don’t have many experience with Qualstar but i suppose, Control FC -> SAN.
      And next u can control the drives directly.

      pipposan

      June 1, 2010 at 14:16


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: