Jump to content

Bacula CapitalBank: Difference between revisions

From TetraWiki
Faisal (talk | contribs)
Created page with "category:Capital Bank '''Installation of Bacula for Capital Bank''' tar -xvzf bacula-5.2.13.tar.gz cd bacula-5.2.13 CFLAGS="-g -Wall" ./configure \ --sbindir=/opt/ba..."
 
Faisal (talk | contribs)
No edit summary
 
Line 262: Line 262:
  /etc/init.d/webmin start
  /etc/init.d/webmin start


You can access webmin via browser, localhost:10000
You can access webmin via browser, localhost:10000


Select the option of Bacula backup system from left drop down menu
Select the option of Bacula backup system from left drop down menu


and you can schedule backup and run backup from the GUI
and you can schedule backup and run backup from the GUI

Latest revision as of 14:58, 5 March 2014

Installation of Bacula for Capital Bank

tar -xvzf bacula-5.2.13.tar.gz
cd bacula-5.2.13
CFLAGS="-g -Wall" ./configure \
--sbindir=/opt/bacula/bin \
--sysconfdir=/opt/bacula/etc \
--enable-smartalloc \
--with-mysql \
--with-openssl \
--with-working-dir=/opt/bacula/working \
--with-pid-dir=/opt/bacula/working \
--with-subsys-dir=/opt/bacula/working \
--enable-batch-insert \
--enable-tray-monitor \
--enable-bat \
--enable-readline
  OUTPUT = Host:		     x86_64-unknown-linux-gnu -- redhat Enterprise release
  Bacula version:	     Bacula 5.2.13 (19 February 2013)
  Source code location:     .
  Install binaries:	     /opt/bacula/bin
  Install libraries:	     /usr/lib64
  Install config files:     /opt/bacula/etc
  Scripts directory:	     /opt/bacula/etc
  Archive directory:	     /tmp
  Working directory:	     /opt/bacula/working
  PID directory:	     /opt/bacula/working
  Subsys directory:	     /opt/bacula/working
  Man directory:	     ${datarootdir}/man
  Data directory:	     /usr/share
  Plugin directory:	     /usr/lib64
  C Compiler:		     gcc 4.4.7
  C++ Compiler:	     /usr/bin/g++ 4.4.7
  Compiler flags:	      -g -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
  Linker flags:	      
  Libraries:		     -lpthread -ldl -ldl 
  Statically Linked Tools:  no
  Statically Linked FD:     no
  Statically Linked SD:     no
  Statically Linked DIR:    no
  Statically Linked CONS:   no
  Database backends:	     MySQL
  Database port:	      
  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:	     
  Director Group:	     
  Storage Daemon User:      
  Storage DaemonGroup:      
  File Daemon User:	     
  File Daemon Group:	     
  Large file support:	     yes
  Bacula conio support:     no 
  readline support:	     no 
  TCP Wrappers support:     no 
  TLS support: 	     yes
  Encryption support:	     yes
  ZLIB support:	     yes
  LZO support: 	     no
  enable-smartalloc:	     yes
  enable-lockmgr:	     no
  bat support: 	     yes
  enable-gnome:	     no 
  enable-bwx-console:	     no 
  enable-tray-monitor:      yes
  client-only: 	     no
  build-dird:		     yes
  build-stored:	     yes
  Plugin support:	     yes
  AFS support: 	     no
  ACL support: 	     no
  XATTR support:	     yes
  Python support:	     no 
  systemd support:	     no 
  Batch insert enabled:     MySQL
make
make install
yum install mysql mysql-server mysql-devel
mysqladmin -u root password capitalbank
/opt/bacula/etc/create_mysql_database -u root -p 
/opt/bacula/etc/make_mysql_tables -uroot -p
/opt/bacula/etc/grant_mysql_privileges -uroot -p
/opt/bacula/etc/grant_bacula_privileges -uroot -p
mysql -uroot -p 
mysql> UPDATE mysql.user SET password=PASSWORD("capitalbank321") WHERE user='bacula';
cd /opt/bacula/etc/

Change the password in each of the conf file and set accordingly.

vim bconsole.conf
Director {
 Name = backup.capitalbank.com-dir
 DIRport = 9101
 address = backup
 Password = "root123"
}
vim bacula-sd.conf ----> change password where required.
#add new entry for Tape Drive
Device {
 Name = LTO-4
 Media Type = LTO-4
 Archive Device = /dev/nst0
 AutomaticMount = yes;               # when device opened, read it
 AlwaysOpen = yes;
 RemovableMedia = yes;
 Requires Mount = no;
 RandomAccess = no;
 Maximum File Size = 100GB
 LabelMedia = yes;
}


vim bacula-dir.conf ---> change the password where required

Job {
 Name = Backup_Oracle
 Type = Backup
 Level = Incremental
 Client = backup.capitalbank.com-fd
 FileSet = "Full Set"
 Schedule = DailyCycle
 Storage = LTO-4
 Messages = Standard
 Pool = File
 Priority = 10
 Write Bootstrap = "/opt/bacula/working/%c.bsr"
}
Job {
 Name = BackupCatalog
 Level = Full
 Client = backup.capitalbank.com-fd
 Type = Backup
 FileSet = Catalog
 Storage = LTO-4
 Schedule = DailyCycle
 Messages = Standard
 Pool = File
 # This creates an ASCII copy of the catalog
 # Arguments to make_catalog_backup.pl are:
 #  make_catalog_backup.pl <catalog-name>
 Run Before Job = "/opt/bacula/etc/make_catalog_backup.pl MyCatalog"
 # This deletes the copy of the catalog
 Run After Job = /opt/bacula/etc/delete_catalog_backup
 Write Bootstrap = "/opt/bacula/working/%n.bsr"
 Priority = 11
}
Job {
 Name = "RestoreFiles"
 Type = Restore
 Client=backup.capitalbank.com-fd                 
 FileSet="Full Set"                  
 Storage = File                      
 Pool = File
 Messages = Standard
 Where = /restore
}
# List of files to be backed up
FileSet {
 Name = "Full Set"
 Include {
   Options {
     signature = MD5
   }
File = /backup
 }
Schedule {
 Name = DailyCycle
 Run = Level=Incremental Pool=File at 14:13
}
FileSet {
 Name = "Catalog"
 Include {
   Options {
     signature = MD5
   }
   File = "/opt/bacula/working/bacula.sql"
 }
}
Client {
 Name = backup.capitalbank.com-fd
 Address = backup
 FDPort = 9102
 Catalog = MyCatalog
 Password = "root123"          # password for FileDaemon
 File Retention = 600 days            # 30 days
 Job Retention = 24 months            # six months
 AutoPrune = yes                     # Prune expired Jobs/Files
}
Storage {
 Name = File 
 Address = backup                # N.B. Use a fully qualified name here
 SDPort = 9103
 Password = "root123"
 Device = FileStorage
 Media Type = File
}
# Definition of tape storage device
Storage {
 Name = LTO-4    
 Address = backup                # N.B. Use a fully qualified name here
 SDPort = 9103
 Password = "root123"          # password for Storage daemon
 Device = LTO-4                     # must be same as Device in Storage daemon
 Media Type = LTO-4                  # must be same as MediaType in Storage daemon
}
# File Pool definition
Pool {
 Name = File
 Pool Type = Backup
 Recycle = yes                       # Bacula can automatically recycle Volumes
 AutoPrune = yes                     # Prune expired volumes
 Volume Retention = 600 days         # one year
 Maximum Volume Bytes = 2000G          # Limit Volume size to something reasonable
 Maximum Volumes = 100
 LabelFormat = "Vol"               # Limit number of Volumes in Pool
}
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 = "capitalbank321"
}
Console {
 Name = backup.capitalbank.com-mon
 Password = "root123"
 CommandACL = status, .status
}

Now start bacula

/opt/bacula/bin/bacula start

access console via:

/opt/bacula/bin/bconsole

It will prompt for option of selecting the backup process and then start the backup process.

run


Install webmin for graphical interface

rpm -ivh webmin-1.660-1.noarch.rpm
/etc/init.d/webmin start

You can access webmin via browser, localhost:10000

Select the option of Bacula backup system from left drop down menu

and you can schedule backup and run backup from the GUI