Bacula Installation and Configuration Build and Configure Bacula
Bacula Installation and Configuration
• Build and Configure Bacula Server • Build and Configure Bacula Clients
Build Bacula Server -1 • Bacula Server OS: Cent. OS 5 64 bit • Bacula Client OS: – Cent. OS 5 64 bit – Windows Server 2008 R 2 • Bacula Soucr Code: 5. 0. 3 • My. SQL Server 5. 0. 77(Cent. OS bundled versioin)
Build Bacula Server -2 • Prerequisite – Install dependencies packages. • • #yum groupinstall "Development Tools“ #yum install mysql-server mysql-devel #yum install qt 4 -devel #ln -s /usr/lib 64/qt 4/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 My. SQL server and import Bacula Server Database. #/etc/init. d/mysqld start #chkconfig mysqld on #/etc/bacula/create_bacula_database -uroot -p Creating My. SQL database Enter password: Creation of bacula database succeeded. #/etc/bacula/grant_bacula_privileges -uroot -p Granting My. SQL privileges Enter password: # /etc/bacula/make_mysql_tables -uroot -p Enter password:
Build and Configure Bacula Server -5 • Configure Bacula Server to access Catalog My. SQL database #vi /etc/baucla/bacula-dir. conf ###In this section, change My. SQL server password here: Catalog { Name = My. Catalog # 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" } • Start Bacula Server daemon #/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: backup 01. 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-sd. conf file, find this section: Director { Name = backup 01. example. com-dir Password = "c. Ik 5 Fox 4+b. S 2 Eyf. B 3/0 C 8+Vui. Dh. Mnu. W 1 zx. CLb 2 zl. Ijpj" } “Name” and “Password” should be same with in /etc/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 = "c. Ik 5 Fox 4+b. S 2 Eyf. B 3/0 C 8+Vui. Dh. Mnu. W 1 zx. CLb 2 zl. Ijpj" Device = File. Storage Media Type = File } 2 in /etc/bacula-sd. conf, fin this section, should like this: Device { Name = File. Storage Media Type = File Archive Device = /backup-pool Label. Media = yes Random Access = yes Automatic. Mount = yes Removable. Media = no Always. Open = no }
Configure Bacula Server -7 • Volume Configuration In /etc/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 Auto. Prune = yes # Prune expired volumes Volume Retention = 365 days # one year Maximum Volume Bytes = 50 G # Limit Volume size to something reasonable Maximum Volumes = 10000 # Limit number of Volumes in Pool Label Format = vol 0000 }
Configure Bacula Client • Configure Bacula Client: In /etc/bacula-dir. conf, append new client settings like this: Client { Name = test 02. example. com-fd Password = "K/k. Fg. Ce. G+n. VYVA 8 uv. Jni 0 ql. FR+FZD 16918 p. Hpp. Y 0 x. Hu 6" Address = 10. 117. 97. 201 FDPort = 9102 Catalog = My. Catalog File Retention = 26 months Job Retention = 6 months } File. Set { Name = test 02 -full Include { File = /etc Options { signature = MD 5 } } Job { Name = test 02. example. com-job Type = Backup Level = Incremental Client = test 02. example. com-fd File. Set = test 02 -full Schedule = Weekly. Cycle 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 install #/etc/bacula start
Install Windows Client • Download client application from link • Install just followed next by next. • Edit the file C: Program FilesBaculabaculafd. conf. (Linux client same configuration. ) Modified this file in this section: Director { Name = backup 01. example. com-dir Password = "KIXTM 3 t 7 m. CDi 6 Xr. SZB 2 Qpunq. S 5 a. Tg 5 JIyqd. Du. AG 8 DH 2 K" } 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
- Slides: 13