step by step bacula 7 configuration in centos 7

Linuxtopic
0


                





Bacula : Bacula is a open source backup utility that allows you to create and restore a backup with network support.






Component :




DIRECTOR – Bacula Director : responsible for backup and restore operation




SD – Storage Daemon : responsible for read and write on storage device




Catalog : service that maintain database of file that are backup.




Console : that is a command line interface




FD – File Daemon : Run the file daemon component by the client that provide bacula




server access for backup






IP and HOST




Directore - Hostname – lokesh-bacula-server.com | IP - 172.17.20.100




Storage Daemon (SD) - Hostname – lokesh-bacula-server.com | IP - 172.17.20.100






File Daemon (FD ) / Client




Hostname – ms-client.com    | IP – 172.17.20.150


Hostname – hs-client.com     | IP – 172.17.20.140






Package :





  1. Server Side






1 MySQL or PostgreSQL


2 Bacula-director


3 Bacula-storage


4 Bacula-console




    B. Client Side




5 Bacula-client






Step 1:


               


Installation and configuration of MySQL/PostgreSQL ….Click Here






Step 2:


       


Install Bacula Package by Epel-Bacula7 Repo :




Install epel-bacula7 package OR create file in /etc/yum.repo.d/




Vi /etc/yum.repo.d/bacula.repo




[epel-bacula7]


name=Bacula backports from rawhide


baseurl=http://repos.fedorapeople.org/repos/slaanesh/bacula7/epel-$releasever/$basearch/


enabled=1


skip_if_unavailable=1


gpgkey=http://repos.fedorapeople.org/repos/slaanesh/bacula7/RPM-GPG-KEY-slaanesh


gpgcheck=1




[epel-bacula7-source]


name=Bacula backports from rawhide - Source


baseurl=http://repos.fedorapeople.org/repos/slaanesh/bacula7/epel-$releasever/SRPMS


enabled=0


skip_if_unavailable=1


gpgkey=http://repos.fedorapeople.org/repos/slaanesh/bacula7/RPM-GPG-KEY-slaanesh


gpgcheck=1




Step 3:




Install Bacula packages




# yum install bacula-*








Step 4:


               


bacula Console configuration




# vi /etc/bacula/bconsole.conf




Director {




Name = lokesh-bacula-server.com-dir    # set director name




DIRport = 9101 # director port




address = 172.17.20.100 # director IP address




Password = "server32" # Director Password




}








Step 5:




Bacula Storage Configuration




Storage {


Name = lokesh-bacula-storage.com-sd    # Set Storage Name


SDPort = 9103     # port


WorkingDirectory = "/var/spool/bacula"


Pid Directory = "/var/run"


Maximum Concurrent Jobs = 20


SDAddress = 172.17.20.100            # Storage Server IP


}




Director {


Name = lokesh-bacula-server.com-dir    # Director Name : you configure previews in bconsole.conf


Password = "server32"            # password for Storage daemon


}




Autochanger {


Name = NAS-Server                # choose name of autochange


Device = NAS                    # Device name


Changer Command = ""


Changer Device = /dev/null


}




Device {


Name = NAS                    # Device name


Media Type = File           


Archive Device = /backup/nas            # Backup Path server


LabelMedia = yes;                 # lets Bacula label unlabeled media


Random Access = Yes;


AutomaticMount = yes;             # when device opened, read it


RemovableMedia = no;


AlwaysOpen = no;


Maximum Concurrent Jobs = 5


}


Messages {


Name = Standard


director = centos-bacula-server-dir = all    # set Director


}












Check configuration file




# bacula-sd -tc /etc/bacula/bacula-sd.conf


               


########### Director Section ##############




Director {


Name = lokesh-bacula-server.com-dir    # should be Same on bconsole.conf


DIRport = 9101             # should be Same on bconsole.conf


QueryFile = "/etc/bacula/query.sql"


WorkingDirectory = "/var/spool/bacula"


PidDirectory = "/var/run"


Maximum Concurrent Jobs = 20


Password = "server32"         # should be Same on bconsole.conf


Messages = Daemon


DirAddress = 172.17.20.100        # should be Same on bconsole.conf


}








##### Sunday Full backup, Wed Differential and other day Inctemental ###




Schedule {


Name = "SundayCycle"


Run = Level=Full sun at 1:00


Run = Level=Differential wed at 2:00


Run = Level=Incremental mon tue thu fri sat at 1:00








Schedule {


Name = "WeeklyCycle"


Run = Full 1st sun at 23:05


Run = Differential 2nd-5th sun at 23:05


Run = Incremental mon-sat at 23:05


}


# This schedule does the catalog. It starts after the WeeklyCycle




Schedule {


Name = "WeeklyCycleAfterBackup"


Run = Full sun-sat at 23:10


}








######## Storage Section ###################




Storage {


Name = Centos-Bacula-NAS        # Choose Name according to you


Address = 172.17.20.100         # Match on bacula-sd.conf


SDPort = 9103            # Match on bacula-sd.conf


Password = "server2"            # Match on bacula-sd.conf


Device = NAS-Server            # Autochange name


Media Type = File


Maximum Concurrent Jobs = 10     # run up to 10 jobs a the same time


}


bacula-dir-store.png




########### Catalog Section #################




Set MySQL Database , User and Password for Catalog




Catalog {


Name = MyCatalog


dbname = "bacula"; dbuser = "bacula"; dbpassword = " "


}






Step 6:




Go to the end Add Line at the end of file for Remote Client Configuration




@|"find /etc/bacula/conf.d -name '*.conf' -type f -exec echo @{} \;"








Save And Exit




Step 7:




Client Configuration :




Create A Conf.d Directory




# mkdir /etc/bacula/conf.d




Create Remote Client File :




# vi /etc/bacula/conf.d/md-client.com




Client 1:




# Md Client  Information




Client {:


Name = md-client.com-fd        #Client Name : will be match on bacula-fd.conf on client side


Address = 172.17.20.140        #Client IP


FDPort = 9102            #Port


Catalog = MyCatalog


Password = "server32"        # Password : will be match on bacula-fd.conf on client side


File Retention = 30 days


Job Retention = 6 months


AutoPrune = yes


}




##Job For Backup ##




JobDefs {


Name = "md-client-job"


Type = Backup


Level = Differential


Client = md-client.com-fd        # Client name :will be match on bacula-fd.conf on client side


FileSet = "md-client-fileset"


Schedule = "SundayCycle"        # schedule : see in bacula-dir.conf


Storage = Centos-Bacula-NAS


Messages = Standard


Pool = md-client-pool


Priority = 10


Write Bootstrap = "/var/spool/bacula/%c.bsr"


}




Job {


Name = "md-client-Backup"


Client = md-client.com-fd        # Client name : will be match on bacula-fd.conf on client side


JobDefs = "md-client-job"


}






##Job For Restore ##




Job {


Name = "md-client-Restore"


Type = Restore


Client= md-client.com-fd        # Client name : will be match on bacula-fd.conf on client side


FileSet= "md-client-fileset"


Storage = Centos-Bacula-NAS


Pool = md-client-pool


Messages = Standard


Where = /restore            # Restore Directory


}








## File set : Select Directory for Backup ##




FileSet {


Name = "md-client-fileset"


Include {


Options {


signature = MD5


compression = GZIP


}


File = /var/www/html/


File = /etc




}




## Exclude  ##




Exclude {




File = /var/spool/bacula


File = /proc


File = /tmp


File = /.journal


File = /.fsck


File = /backup


}


}




## Pool Configuration ##




Pool {


Name = md-client-pool            # pool name


Pool Type = Backup


Recycle = yes


Label Format = md-client-backup-file-        # set volume label format


AutoPrune = yes


Volume Retention = 180 days


Maximum Volume Bytes = 50G


Maximum Volumes = 100


}


bacula-client-2.png




save and exit file






Client 2:




# vi /etc/bacula/conf.d/hs-client.conf




# HS Client Information #




Client {




 Name = hs-client.com-fd       #Client Name : will be match on bacula-fd.conf on client side


 Address = 172.17.20.140       #Client IP or Best option is fully qualified domain name


 FDPort = 9102                 #Port


 Catalog = MyCatalog


 Password = "server32"         # Password : will be match on bacula-fd.conf on client side


 File Retention = 30 days


 Job Retention = 6 months


 AutoPrune = yes


}




##Job For Backup ##




JobDefs {


 Name = "hs-client-job"


 Type = Backup


 Level = Differential


 Client = hs-client.com-fd     # Client name :will be match on bacula-fd.conf on client side


 FileSet = "hs-client-fileset"


 Schedule = "SundayCycle"      # schedule : see in bacula-dir.conf


 Storage = Centos-Bacula-NAS


 Messages = Standard


 Pool = hs-client-pool


 Priority = 10


 Write Bootstrap = "/var/spool/bacula/%c.bsr"


}




Job {


 Name = "hs-client-Backup"


 Client = hs-client.com-fd         # Client name : will be match on bacula-fd.conf on client side


 JobDefs = "hs-client-job"


}




## Job For Restore ##




Job {


 Name = "hs-client-Restore"


 Type = Restore


 Client= hs-client.com-fd      # Client name : will be match on bacula-fd.conf on client side


 FileSet= "hs-client-fileset"


 Storage = Centos-Bacula-NAS


 Pool = hs-client-pool


 Messages = Standard


 Where = /restore              # Restore Directory




}




# File set : Select Directory for Backup #




FileSet {


 Name = "hs-client-fileset"


 Include {


    Options {


     signature = MD5


       compression = GZIP


    }


               File = /var/www/html/


               File = /etc


 }




 Exclude {


    File = /var/spool/bacula


    File = /proc


    File = /tmp


    File = /.journal


    File = /.fsck


    File = /backup


 }


}




## Pool Configuration ##




Pool {


 Name = hs-client-pool                            # pool name


 Pool Type = Backup


 Recycle = yes


 Label Format = hs-client-backup-file-         # set volume label format


 AutoPrune = yes


 Volume Retention = 180 days


 Maximum Volume Bytes = 50G


 Maximum Volumes = 100


}



Bacula 7 Configuration







Bacula Client Configuration..







Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!