bacula installation and configuration

13
Bacula Installation and Configuration

Upload: kwanita-edwards

Post on 31-Dec-2015

26 views

Category:

Documents


3 download

DESCRIPTION

Bacula Installation and Configuration. Build and Configure Bacula Server Build and Configure Bacula Clients. Build Bacula Server -1. Bacula Server OS: CentOS 5 64bit Bacula Client OS: CentOS 5 64bit Windows Server 2008R2 Bacula Soucr Code: 5.0.3 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Bacula Installation and Configuration

Bacula Installation and Configuration

Page 2: Bacula Installation and Configuration

• Build and Configure Bacula Server• Build and Configure Bacula Clients

Page 3: Bacula Installation and Configuration

Build Bacula Server -1

• Bacula Server OS: CentOS 5 64bit• Bacula Client OS:– CentOS 5 64bit– Windows Server 2008R2

• Bacula Soucr Code: 5.0.3• MySQL Server 5.0.77(CentOS bundled

versioin)

Page 4: Bacula Installation and Configuration

Build Bacula Server -2

• Prerequisite– Install dependencies packages.• #yum groupinstall "Development Tools“• #yum install mysql-server mysql mysql-devel• #yum install qt4 qt4-devel• #ln -s /usr/lib64/qt4/bin/qmake /usr/sbin/qmake

Page 5: Bacula Installation and Configuration

Build and configure Bacula Server -3

• Download source code from link• Build source code

#CFLAGS="-g -Wall" ./configure \ --sbindir=/usr/sbin \ --sysconfdir=/etc/bacula \ --with-scriptdir=/etc/bacula \ --with-openssl --enable-smartalloc \ --enable-bwx-console \ --enable-bat \ --with-mysql \ --with-working-dir=/var/bacula \ --with-pid-dir=/var/run \ --enable-conio#make…………………..#make install…………………..

Page 6: Bacula Installation and Configuration

Build and Configure Bacula Server -4

• Configure MySQL server and import Bacula Server Database.

#/etc/init.d/mysqld start#chkconfig mysqld on#/etc/bacula/create_bacula_database -uroot -pCreating MySQL databaseEnter password:Creation of bacula database succeeded.#/etc/bacula/grant_bacula_privileges -uroot -pGranting MySQL privilegesEnter password:# /etc/bacula/make_mysql_tables -uroot -p

Enter password:

Page 7: Bacula Installation and Configuration

Build and Configure Bacula Server -5• Configure Bacula Server to access Catalog

MySQL database

• Start Bacula Server daemon

#vi /etc/baucla/bacula-dir.conf###In this section, change MySQL server password here:Catalog { Name = MyCatalog# Uncomment the following line if you want the dbi driver# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport = dbname = "bacula"; dbuser = "bacula"; dbpassword = "password"}

#/etc/bacula/bacula start /etc/bacula/bacula startStarting the Bacula Storage daemonStarting the Bacula File daemonStarting the Bacula Director daemon# bconsoleConnecting to Director localhost:91011000 OK: backup01.example.com.cn-dir Version: 5.0.3 (04 August 2010)Enter a period to cancel a command. *

Page 8: Bacula Installation and Configuration

Configure Bacula Server -6

• Configure Storage Daemon1 In /etc/bacula/bacula-sd.conf file, find this section:Director { Name = backup01.example.com-dir Password = "cIk5Fox4+bS2EyfB3/0C8+VuiDhMnuW1zxCLb2zlIjpj"}

“Name” and “Password” should be same with in /etc/bacula/bacula-dir.conf file, Storage { Name = File# Do not use "localhost" here Address = 10.117.76.6 # N.B. Use a fully qualified name here SDPort = 9103 Password = "cIk5Fox4+bS2EyfB3/0C8+VuiDhMnuW1zxCLb2zlIjpj" Device = FileStorage Media Type = File}2 in /etc/bacula/bacula-sd.conf, fin this section, should like this:Device { Name = FileStorage Media Type = File Archive Device = /backup-pool LabelMedia = yes Random Access = yes AutomaticMount = yes RemovableMedia = no AlwaysOpen = no}

Page 9: Bacula Installation and Configuration

Configure Bacula Server -7

• Volume Configuration

In /etc/bacula/bacula-dir.conf file, find the section and set as below:# File Pool definitionPool { Name = File Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year Maximum Volume Bytes = 50G # Limit Volume size to something reasonable Maximum Volumes = 10000 # Limit number of Volumes in Pool Label Format = vol0000}

Page 10: Bacula Installation and Configuration

Configure Bacula Client• Configure Bacula Client:

In /etc/bacula/bacula-dir.conf, append new client settings like this:Client { Name = test02.example.com-fd Password = "K/kFgCeG+nVYVA8uvJni0qlFR+FZD16918pHppY0xHu6" Address = 10.117.97.201 FDPort = 9102 Catalog = MyCatalog File Retention = 26 months Job Retention = 6 months}FileSet { Name = test02-full Include { File = /etc Options { signature = MD5 } }Job { Name = test02.example.com-job Type = Backup Level = Incremental Client = test02.example.com-fd FileSet = test02-full Schedule = WeeklyCycle Storage = File Pool = File Messages = Standard}

Page 11: Bacula Installation and Configuration

Build and Configure Bacula Client(Linux) -1

• Prerequisites same with Bacula Server’s.• Command:

#CFLAGS="-g -Wall" ./configure \ --sbindir=/usr/sbin \ --sysconfdir=/etc/bacula \ --with-scriptdir=/etc/bacula \ --with-openssl --enable-smartalloc \ --enable-bwx-console \ --enable-client-only \ --with-working-dir=/var/bacula \ --with-pid-dir=/var/run \ --enable-conio

#make

#make install

#/etc/bacula/bacula start

Page 12: Bacula Installation and Configuration

Install Windows Client

• Download client application from link• Install just followed next by next.• Edit the file C:\Program Files\Bacula\bacula-

fd.conf. (Linux client same configuration.)

Modified this file in this section:Director { Name = backup01.example.com-dir Password = "KIXTM3t7mCDi6XrSZB2QpunqS5aTg5JIyqdDuAG8DH2K"}Make sure Fields “Name” and “password” same as in bacula-dir in bacula server.

Page 13: Bacula Installation and Configuration

Note

• Make sure that firewall allows the related port passed.

Configure Firewall- Allow bacula ports 9101/9102/9103 through iptables#vi /etc/sysconfig/iptables ##add those 3 lines into this file-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