Normally after updating the config files, I will let the programs to proof read, checking for syntax errors. To test the syntax of the config files, you can use:
bacula-sd -t /etc/bacula/bacula-sd.conf bacula-fd -t /etc/bacula/bacula-fd.conf bacula-dir -t /etc/bacula/bacula-dir.conf
I have attached below, a working copy of bacula-sd.conf, bacula-fd.conf and bacula-dir.conf.
Below is bacula-sd.conf:
# Default Bacula Storage Daemon Configuration file # # For Bacula release 2.4.4 (28 December 2008) -- redhat Enterprise release # # You may need to change the name of your tape drive # on the "Archive Device" directive in the Device # resource. If you change the Name and/or the # "Media Type" in the Device resource, please ensure # that dird.conf has corresponding changes. # Storage { # definition of myself Name = bacula-sd SDPort = 9103 # Director's port WorkingDirectory = "/var/spool/bacula" Pid Directory = "/var/run" Maximum Concurrent Jobs = 20 } # # List Directors who are permitted to contact Storage daemon # Director { Name = bacula-dir Password = "d84c7934a7a786d26da3d34d5f7c6c86" } # # Restricted Director, used by tray-monitor to get the # status of the storage daemon # Director { Name = bacula-mon Password = "d84c7934a7a786d26da3d34d5f7c6c86" Monitor = yes } # # Devices supported by this Storage daemon # To connect, the Director's bacula-dir.conf must have the # same Name and MediaType. # Device { Name = FileStorage Media Type = File Archive Device =/bacula-backup LabelMedia = yes; # lets Bacula label unlabeled media Random Access = Yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; } # # Send all messages to the Director, # mount messages also are sent to the email address # Messages { Name = Standard director = bacula-dir = all }Attached below is a working copy of bacula-fd.conf.
# # Default Bacula File Daemon Configuration file # # For Bacula release 2.4.4 (28 December 2008) -- redhat Enterprise release # # There is not much to change here except perhaps the # File daemon Name to # # # List Directors who are permitted to contact this File daemon # Director { Name = bacula-dir Password = "d84c7934a7a786d26da3d34d5f7c6c86" } # # Restricted Director, used by tray-monitor to get the # status of the file daemon # Director { Name = bacula-mon Password = "d84c7934a7a786d26da3d34d5f7c6c86" Monitor = yes } # # "Global" File daemon configuration specifications # FileDaemon { # this is me Name = bacula-fd FDport = 9102 # where we listen for the director WorkingDirectory = /var/spool/bacula Pid Directory = /var/run Maximum Concurrent Jobs = 20 } # Send all messages except skipped files back to Director Messages { Name = Standard director = bacula-dir = all, !skipped, !restored }
Attached below is bacula-dir.conf.
# # Default Bacula Director Configuration file # # The only thing that MUST be changed is to add one or more # file or directory names in the Include directive of the # FileSet resource. # # For Bacula release 2.4.4 (28 December 2008) -- redhat Enterprise release # # You might also want to change the default email address # from root to your address. See the "mail" and "operator" # directives in the Messages resource. # Director { # define myself Name = bacula-dir DIRport = 9101 # where we listen for UA connections QueryFile = "/etc/bacula/query.sql" WorkingDirectory = "/var/spool/bacula" PidDirectory = "/var/run" Maximum Concurrent Jobs = 1 Password = "d84c7934a7a786d26da3d34d5f7c6c86" # Console password Messages = Daemon } ################################################################# # Backup for RHEL5_59 # ################################################################# # Define the main nightly save backup job # By default, this job will back up to disk in Job { Name = "RHEL5_59" Write Bootstrap = "/var/spool/bacula/%c_%n.bsr" Type = Backup Client = RHEL5_59 FileSet = "RHEL5_59" Schedule = "RHEL5_59" Storage = File Messages = Standard Pool = Default Priority = 10 } # List of files to be backed up FileSet { Name = "RHEL5_59" Include { Options { signature = MD5 } File = /etc } # # If you backup the root directory, the following two excluded # files can be useful # # Exclude { # File = /proc # File = /tmp # File = /.journal # File = /.fsck # } } # # When to do the backups, full backup on first sunday of the month, # differential (i.e. incremental since full) every other sunday, # and incremental backups other days Schedule { Name = "RHEL5_59" Run = Full 1st sun at 20:26 Run = Differential 2nd-5th sun at 20:26 Run = Incremental mon-sat at 20:26 } # Client (File Services) to backup Client { Name = RHEL5_59 Address = localhost FDPort = 9102 Catalog = MyCatalog Password = "d84c7934a7a786d26da3d34d5f7c6c86" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } ################################################################# # Backup for F18_23 # ################################################################# # Define the main nightly save backup job # By default, this job will back up to disk in Job { Name = "F18_23" Write Bootstrap = "/var/spool/bacula/%c_%n.bsr" Type = Backup Client = F18_23 FileSet = "F18_23" Schedule = "F18_23" Storage = File Messages = Standard Pool = Default Priority = 10 } # List of files to be backed up FileSet { Name = "F18_23" Include { Options { signature = MD5 } File = /etc File = /var/www/ } # # If you backup the root directory, the following two excluded # files can be useful # # Exclude { # File = /proc # File = /tmp # File = /.journal # File = /.fsck # } } # # When to do the backups, full backup on first sunday of the month, # differential (i.e. incremental since full) every other sunday, # and incremental backups other days Schedule { Name = "F18_23" Run = Full 1st sun at 20:26 Run = Differential 2nd-5th sun at 20:26 Run = Incremental mon-sat at 20:26 } # Client (File Services) to backup Client { Name = F18_23 Address = 192.168.0.23 FDPort = 9102 Catalog = MyCatalog Password = "d84c7934a7a786d26da3d34d5f7c6c86" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } ################################################################# # Backup for CENTOS6 # ################################################################# # Define the main nightly save backup job # By default, this job will back up to disk in Job { Name = "CENTOS6_38" Write Bootstrap = "/var/spool/bacula/%c_%n.bsr" Type = Backup Client = CENTOS6_38 FileSet = "CENTOS6_38" Schedule = "CENTOS6_38" Storage = File Messages = Standard Pool = Default Priority = 10 } # List of files to be backed up FileSet { Name = "CENTOS6_38" Include { Options { signature = MD5 } File = /etc File = /var/www/ } # # If you backup the root directory, the following two excluded # files can be useful # # Exclude { # File = /proc # File = /tmp # File = /.journal # File = /.fsck # } } # # When to do the backups, full backup on first sunday of the month, # differential (i.e. incremental since full) every other sunday, # and incremental backups other days Schedule { Name = "CENTOS6_38" Run = Full 1st sun at 20:26 Run = Differential 2nd-5th sun at 20:26 Run = Incremental mon-sat at 20:26 } # Client (File Services) to backup Client { Name = CENTOS6_38 Address = 192.168.0.38 FDPort = 9102 Catalog = MyCatalog Password = "d84c7934a7a786d26da3d34d5f7c6c86" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } ################################################################# # Backup for Catalog on RHEL5_59 # ################################################################# # Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" Level = Full FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.plRunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog" # This deletes the copy of the catalog RunAfterJob = "/usr/libexec/bacula/delete_catalog_backup" Write Bootstrap = "/var/spool/bacula/%c_%n.bsr" Priority = 11 # run after main backup Type = Backup Client = RHEL5_59 Storage = File Messages = Standard Pool = Default } # This is the backup of the catalog FileSet { Name = "Catalog" Include { Options { signature = MD5 } File = /var/spool/bacula/bacula.sql } } # This schedule does the catalog. It starts after the WeeklyCycle Schedule { Name = "WeeklyCycleAfterBackup" Run = Full sun-sat at 23:10 } # # Standard Restore template, to be changed by Console program # Only one such job is needed for all Jobs/Clients/Storage ... # Job { Name = "RestoreFiles" Type = Restore Client=RHEL5_59 FileSet="RHEL5_59" Storage = File Pool = Default Messages = Standard Where = /bacula-restores } # Definition of file storage device Storage { Name = File Address = localhost # N.B. Use a fully qualified name here SDPort = 9103 Password = "d84c7934a7a786d26da3d34d5f7c6c86" Device = FileStorage Media Type = File } # Generic catalog service Catalog { Name = MyCatalog dbname = "bacula"; dbuser = "bacula"; dbpassword = "" } # Reasonable message delivery -- send most everything to email address # and to the console Messages { Name = Standard # # NOTE! If you send to two email or more email addresses, you will need # to replace the %r in the from field (-f part) with a single valid # email address in both the mailcommand and the operatorcommand. # What this does is, it sets the email address that emails would display # in the FROM field, which is by default the same email as they're being # sent to. However, if you send email to more than one address, then # you'll have to set the FROM address manually, to a single address. # for example, a 'no-reply@mydomain.com', is better since that tends to # tell (most) people that its coming from an automated source. # mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" mail = root@localhost = all, !skipped operator = root@localhost = mount console = all, !skipped, !saved # Default pool definition Pool { Name = Default Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year Label Format = "File-" } # Scratch pool definition Pool { Name = Scratch Pool Type = Backup } # # Restricted console used by tray-monitor to get the status of the director # Console { Name = bacula-mon Password = "d84c7934a7a786d26da3d34d5f7c6c86" CommandACL = status, .status }
No comments :
Post a Comment