Bacula: Difference between revisions

From CSLLabWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 139: Line 139:
chown -R bacula.bacula /usr/local/bacula
chown -R bacula.bacula /usr/local/bacula


### Now for the init scripts ##############################
== Install Init Scripts ==
cd ./platforms/redhat
cd /usr/local/bacula-src/bacula-3.0.2/platforms/redhat


chmod +x bacula-dir
chmod +x bacula-dir
Line 156: Line 156:


</pre></code>
</pre></code>
== Configure Firewall and Apache ==
* system-config-securitylevel-tui
** Select "Customize" button
** Enable "WWW (HTTP)" and "Secure WWW (HTTPS)"
** Add "tcp:9101,udp:9101" to "Other ports"
** Select "OK" twice to exit
== Configuring MySQL Database ==
* /etc/init.d/mysqld start
** Follow on-screen instructions to set root password for MySQL
** Test logging into database: mysql -u root --password (quit to exit)
*


== Web GUI Install (bweb) ==
== Web GUI Install (bweb) ==

Revision as of 09:52, 22 August 2009

"It comes by night and sucks the vital essence from your computers." -Bacula Project

How perfect for Transylvania... muhahahaha!

Bacula is an enterprise-class, open source, network backup solution. While its configuration and use may seem daunting to understand at first, its structure is very logical and easy to use and maintain once you understand the basics. Bacula is supported by a team of developers that also offer commercial support for the product which is in its third version.

Bacula's Website

Basics

Bacula consists of 3 basic daemons and thus 3 config files:

  1. bacula-dir.conf - The director config.. the BIG config.. jobs, clients, schedules, etc (server only)
  2. bacula-sd.conf - The storage daemon config.. tape and/or disk drive config (server only)
  3. bacula-fd.conf - The file daemon config.. allows the director to backup the system (server + clients)

TBC..

Server Installation

  • This documentation is from the install of version 3.0.2 from sourcecode onto Kay on Aug 21, 2009 by Chris Moore.

mkdir /usr/local/bacula-src  # Where we will keep and build the source
mkdir /usr/local/bacula      # The installation directory (binaries, configs, etc)
cd /usr/local/bacula-src

wget http://downloads.sourceforge.net/project/bacula/bacula/3.0.2/bacula-3.0.2.tar.bz2
wget http://downloads.sourceforge.net/project/bacula/bacula/3.0.2/bacula-gui-3.0.2.tar.bz2
wget http://downloads.sourceforge.net/project/bacula/bacula/3.0.2/bacula-docs-3.0.2.tar.bz2
wget http://downloads.sourceforge.net/project/bacula/bacula/3.0.2/bacula-rescue-3.0.2.tar.bz2

tar -xvzf bacula-3.0.2.tar.bz2
tar -xvzf bacula-gui-3.0.2.tar.bz2
tar -xvjf bacula-docs-3.0.2.tar.bz2
tar -xvzf bacula-rescue-3.0.2.tar.bz2

cd ./bacula-3.0.2

yum install httpd phpmyadmin mysql mysql-devel mysql-server qwtplot3d qwtplot3d-devel zlib-devel gccc gcc-c++ python-devel readline-devel

groupadd bacula -g 811
useradd bacula -u 811 -g 811 -d /usr/local/bacula -s /sbin/nologin

./configure --sbindir=/usr/local/bacula/bin \
            --sysconfdir=/usr/local/bacula \
            --enable-smartalloc \
            --with-qwt=/usr/lib/libqwt.so \
            --enable-batch-insert \
            --enable-tray-monitor \
            --enable-largefile \
            --enable-readline \
            --with-mysql \
            --with-openssl \
            --with-python \
            --with-working-dir=/usr/local/bacula \
            --with-dir-user=bacula \
            --with-dir-group=bacula \
            --with-sd-user=bacula \
            --with-sd-group=bacula \
            --with-fd-user=root \
            --with-fd-group=root

Output:

Configuration on Sat Aug 22 04:38:27 EDT 2009:

   Host:                    x86_64-unknown-linux-gnu -- redhat
   Bacula version:          Bacula 3.0.2 (18 July 2009)
   Source code location:    .
   Install binaries:        /usr/local/bacula/bin
   Install libraries:       /usr/lib
   Install config files:    /usr/local/bacula
   Scripts directory:       /usr/local/bacula
   Archive directory:       /tmp
   Working directory:       /usr/local/bacula
   PID directory:           /var/run
   Subsys directory:        /var/lock/subsys
   Man directory:           ${datarootdir}/man
   Data directory:          /usr/share
   Plugin directory:        /usr/lib
   C Compiler:              gcc 4.1.2
   C++ Compiler:            /usr/bin/g++ 4.1.2
   Compiler flags:           -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
   Linker flags:
   Libraries:               -lpthread -ldl
   Statically Linked Tools: no
   Statically Linked FD:    no
   Statically Linked SD:    no
   Statically Linked DIR:   no
   Statically Linked CONS:  no
   Database type:           MySQL
   Database port:
   Database lib:            -L/usr/lib64/mysql -lmysqlclient_r -lz
   Database name:           bacula
   Database user:           bacula

   Job Output Email:        root@localhost
   Traceback Email:         root@localhost
   SMTP Host Address:       localhost

   Director Port:           9101
   File daemon Port:        9102
   Storage daemon Port:     9103

   Director User:           bacula
   Director Group:          bacula
   Storage Daemon User:     bacula
   Storage DaemonGroup:     bacula
   File Daemon User:        root
   File Daemon Group:       root

   SQL binaries Directory   /usr/bin

   Large file support:      yes
   Bacula conio support:    yes -ltermcap
   readline support:        no
   TCP Wrappers support:    no
   TLS support:             yes
   Encryption support:      yes
   ZLIB support:            yes
   enable-smartalloc:       yes
   enable-lockmgr:          no
   bat support:             no
   enable-gnome:            no
   enable-bwx-console:      no
   enable-tray-monitor:     yes
   client-only:             no
   build-dird:              yes
   build-stored:            yes
   ACL support:             no
   XATTR support:           yes
   Python support:          yes -L/usr/lib64/python2.4/config -lpython2.4 -lutil -lrt
   Batch insert enabled:    yes


make all
make install

chown -R bacula.bacula /usr/local/bacula

== Install Init Scripts ==
cd /usr/local/bacula-src/bacula-3.0.2/platforms/redhat

chmod +x bacula-dir
chmod +x bacula-sd
chmod +x bacula-fd

cp bacula-dir /etc/init.d
cp bacula-sd /etc/init.d
cp bacula-fd /etc/init.d

chkconfig --add bacula-dir
chkconfig --add bacula-sd
chkconfig --add bacula-fd
chkconfig mysqld on

Configure Firewall and Apache

  • system-config-securitylevel-tui
    • Select "Customize" button
    • Enable "WWW (HTTP)" and "Secure WWW (HTTPS)"
    • Add "tcp:9101,udp:9101" to "Other ports"
    • Select "OK" twice to exit



Configuring MySQL Database

  • /etc/init.d/mysqld start
    • Follow on-screen instructions to set root password for MySQL
    • Test logging into database: mysql -u root --password (quit to exit)


Web GUI Install (bweb)

  • Bweb is a Perl based front-end to Bacula. Great for reporting and checking logs, though I wouldn't recommend using it to interface with the Bacula directore - use bconsole.

cd /usr/local/bacula-src/bacula-gui-3.0.2











Client Installation