160 likes | 337 Views
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
E N D
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 • MySQL Server 5.0.77(CentOS bundled versioin)
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
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 • …………………..
Build and Configure Bacula Server -4 • Configure MySQL server and import Bacula Server Database. • #/etc/init.d/mysqld start • #chkconfigmysqld on • #/etc/bacula/create_bacula_database -uroot -p • Creating MySQL database • Enter password: • Creation of bacula database succeeded. • #/etc/bacula/grant_bacula_privileges -uroot -p • Granting MySQL privileges • Enter password: • # /etc/bacula/make_mysql_tables -uroot -p • Enter password:
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 start Starting the Bacula Storage daemon Starting the Bacula File daemon Starting the Bacula Director daemon # bconsole Connecting to Director localhost:9101 1000 OK: backup01.example.com.cn-dir Version: 5.0.3 (04 August 2010) Enter a period to cancel a command. *
Configure Bacula Server -6 • Configure Storage Daemon 1 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 }
Configure Bacula Server -7 • Volume Configuration In /etc/bacula/bacula-dir.conf file, find the section and set as below: # File Pool definition Pool { 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 }
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 }
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
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.
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