Example Director Configuration File
An example Director configuration file might be the following:
#
# Default Bacula Director Configuration file
#
# For Bacula release 16.0.6 (26 May 2023) -- redhat (Core)
#
# You might want to change the default email address
# from root to your email address. See the "mail" and
# "operator" directives in the Messages resource.
#
# Copyright (C) 2000-2020 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
# This is the Director definition. Bacula consoles
# using the bconsole program will communicate with the
# Director using the Director name and the Password
# values defined in this resource.
# -----------------------------------------------------
Director {
Name = bacula-dir
DIRPort = 9101
QueryFile = "/opt/bacula/scripts/query.sql"
WorkingDirectory = "/opt/bacula/working"
PIDDirectory = "/opt/bacula/working"
MaximumConcurrentJobs = 20
Password = "oHCFQnh1btsbM3ccDbQb7ULATlE/jGFA75Lh+FA9mbOv"
Messages = Daemon
# CustomerId = TheCustomerId
}
# This is a JobDefs resource that can be used by any
# Job resources that share similar configurations. It
# is useful when multiple backup jobs differ, in just
# one or a few settings
# -----------------------------------------------------
JobDefs {
Name = BackupsToDisk
Type = Backup
Client = bacula-fd
Level = Incremental
Schedule = Manual
Storage = DiskAutochanger
Messages = Default
Pool = DiskBackup365d
Priority = 10
MaximumConcurrentJobs = 5
Write Bootstrap = /opt/bacula/bsr/%c_%n.bsr
}
# This Job resource uses the configuration defined in
# the BackupsToDisk JobDefs resource. This backup job
# will backup the home directory of the Client defined
# in the BackupsToDisk JobDefs resource, so no Client
# is required in this resource.
# -----------------------------------------------------
Job {
Name = LinuxHome
JobDefs = BackupsToDisk
FileSet = LinuxHome
}
# This Job resource uses the configuration defined in
# the BackupsToDisk JobDefs resource. This backup job
# will backup the etc directory of the Client defined
# in the BackupsToDisk JobDefs resource and it will use
# a different schedule.
# -----------------------------------------------------
Job {
Name = LinuxEtc
JobDefs = BackupsToDisk
FileSet = LinuxEtc
Schedule = WeeklyFull
}
# This Job resource defines everything necessary to
# backup the Bacula configuration files. It does not
# make use of the the BackupsToDisk JobDefs.
# -----------------------------------------------------
Job {
Name = BaculaDirectorConfigs
Type = Backup
Client = bacula-fd
Level = Incremental
FileSet = BaculaConfigs
Schedule = WeeklyFull
Storage = DiskAutochanger
Messages = Default
Pool = DiskBackup365d
Priority = 10
Write Bootstrap = /opt/bacula/bsr/%c_%n.bsr
}
# This is the Catalog backup job. It should be run
# regularly when no other backup jobs are running to
# get a consistent backup of the Bacula catalog
# database.
# -----------------------------------------------------
Job {
Name = BaculaDirectorCatalog
Type = Backup
Level = Full
Client = bacula-fd
FileSet= BaculaCatalog
Schedule = DailyFull
Storage = DiskCatalogStorage
Messages = Default
Pool = CatalogBackup14d
Priority = 11
WriteBootstrap = "/opt/bacula/bsr/%n.bsr"
RunBeforeJob = "/opt/bacula/scripts/make_catalog_backup.pl BaculaCatalog"
RunAfterJob = "/opt/bacula/scripts/delete_catalog_backup"
AllowDuplicateJobs = no
CancelLowerLevelDuplicates = yes
CancelQueuedDuplicates = yes
AllowIncompleteJobs = no
}
# This is a Job of type "Restore". Many of the
# directives configured are place holders to satisfy
# the configuration parser and may be modified just
# prior to submitting the restore job.
# -----------------------------------------------------
Job {
Name = Restore
Type = Restore
Client = bacula-fd
FileSet= BaculaConfigs
Storage = DiskAutochanger
Pool = DiskBackup365d
Messages = Default
Where = "/opt/bacula/archive/bacula-restores"
MaximumConcurrentJobs = 5
}
# This is a FileSet resource. It may be used by one or
# more backup jobs to backup the /opt/bacula/etc
# directory. An MD5 signature will be computed for all
# files saved.
# -----------------------------------------------------
FileSet {
Name = BaculaConfigs
Include {
Options {
Signature = md5
}
File = "/opt/bacula/etc"
}
}
# This FileSet is used to backup the Bacula catalog
# dump file which is generated by a RunScript in the
# BaculaDirectorCatalog Job.
# -----------------------------------------------------
FileSet {
Name = BaculaCatalog
Description = "This is used for the Catalog backup Job only"
Include {
Options {
Signature = md5
}
File = "/opt/bacula/working/bacula.sql"
}
}
# This FileSet may be used by one or more backup jobs
# to backup the /home directory.
# -----------------------------------------------------
FileSet {
Name = LinuxHome
Include {
Options {
Signature = md5
}
File = /home
}
}
# This FileSet may be used by one or more backup jobs
# to backup the /etc directory.
# -----------------------------------------------------
FileSet {
Name = LinuxEtc
Include {
Options {
Signature = md5
}
File = /etc
}
}
# List of files to be backed up
# -----------------------------------------------------
FileSet {
Name = FullSet
Include {
Options {
signature = MD5
}
#
# Put your list of files here, preceded by 'File =', one per line
# or include an external list with:
#
# File = <file-name
#
# Note: / backs up everything on the root partition.
# if you have other partitions such as /usr or /home
# you will probably want to add them too.
#
# By default this is defined to point to the Bacula binary
# directory to give a reasonable FileSet to backup to
# disk storage during initial testing.
#
File = /opt/bacula/bin
}
#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
File = /opt/bacula/working
File = /opt/bacula/archive
File = /proc
File = /tmp
File = /sys
File = /.journal
File = /.fsck
}
}
# This is a Schedule resource that may be used by any
# Job resource. Any Job that uses this schedule will
# run at Full level on Sundays at 23:05 and it will run
# at Incremental level from Mondays to Saturdays at
# 23:05.
# -----------------------------------------------------
Schedule {
Name = WeeklyFull
Run = Full Sun at 23:05
Run = Incremental Mon-Sat at 23:05
}
# This is a Schedule resource for the Catalog job.
# It runs a daily Full backup at 2AM.
# -----------------------------------------------------
Schedule {
Name = DailyFull
Run = Full daily at 02:00
}
# This is a schedule that will never trigger any Jobs.
# It may be used in jobs just to clearly signify that
# the job is to be run manually.
# -----------------------------------------------------
Schedule {
Name = Manual
}
# This is a Client resource. Any File Daemon (Client)
# that this Director will contact must be configured in
# the Director configuration file. The Password value
# must be the same as the one defined in the Director
# resource in the File Daemon's bacula-fd.conf file.
# -----------------------------------------------------
Client {
Name = bacula-fd
Address = bacula
FDPort = 9102
Catalog = BaculaCatalog
Password = Y5xRPsXwOHoZA7hbfzhUHzkTR9PcHKqDdfA3gmHQ+XUS
FileRetention = 60 days
JobRetention = 6 months
AutoPrune = Yes
}
# This is an Autochanger resource. Any Autochanger
# defined in a Storage Daemon this Director will
# contact must be configured in the Director
# configuration file. The Password value must be the
# same as the one defined in the Director resource in
# the Storage Daemon's bacula-sd.conf file.
# -----------------------------------------------------
Autochanger {
Name = DiskAutochanger
Address = bacula
SDPort = 9103
Password = "Zc1a8NE61JbcWOlW1Pk8iLlJ39wxPo0EGNRMfTd6jHeh"
Device = DiskAutochanger
MediaType = DiskVolume
MaximumConcurrentJobs = 10
}
# This is a Storage resource. It points to a single
# storage device in a Storage Daemon. Any Storage
# defined in a Storage Daemon that Director will
# contact muct be configured in the Director
# configuration file. The Password value must be the
# same as the one defined in the Director resource in
# the Storage Daemon's bacula-sd.conf file.
# -----------------------------------------------------
Storage {
Name = DiskCatalogStorage
Description = "Exclusively used for Catalog backups. Do not use for any other jobs!"
Address = bacula
SDPort = 9103
Password = "Zc1a8NE61JbcWOlW1Pk8iLlJ39wxPo0EGNRMfTd6jHeh"
Device = DiskCatalogDevice
MediaType = CatalogVolume
MaximumConcurrentJobs = 1
}
# This is the Catalog resource. The connection
# settings to allow access to the Catalog database must
# be defined in this resource (database name, user,
# password, host, port, etc.).
# -----------------------------------------------------
Catalog {
Name = BaculaCatalog
DBname = "bacula"
DBuser = "bacula"
DBpassword = ""
}
# This is a Messages resource. It is used by jobs to
# report and log events.
# -----------------------------------------------------
Messages {
Name = Default
MailCommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
OperatorCommand = "/opt/bacula/bin/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
Append = "/opt/bacula/log/bacula.log" = All, !Skipped
Catalog = All
}
# This is another Messages resource. It is used by the
# Director daemon to report and log events.
# -----------------------------------------------------
Messages {
Name = Daemon
MailCommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
Mail = root@localhost = All, !Skipped
Console = All
Append = "/opt/bacula/log/bacula.log" = All, !Skipped
Catalog = All
}
# This is a Pool resource. A pool represents a set of
# volumes. The volumes created in this example Pool
# will have a retention period of 365 days and they
# will have a size limit of 50G. This Pool allows up
# to 100 volumes. Volumes can be automatically recycled
# and reused (Recycle = Yes and AutoPrune = Yes).
# -----------------------------------------------------
Pool {
Name = DiskBackup365d
PoolType = Backup
Recycle = Yes
AutoPrune = Yes
VolumeRetention = 365 days
MaximumVolumeBytes = 50G
MaximumVolumes = 100
VolumeUseDuration = 23h
LabelFormat = Vol-
}
# This is another Pool resource which is used by the
# BaculaDirectorCatalog Job. Volumes in this Pool will
# have a retention period of 14 days, and a limit of
# one job per volume. Once the limit of 16 volumes is
# reached, volumes can be automatically recycled and
# reused (Recycle = Yes and AutoPrune = Yes).
# -----------------------------------------------------
Pool {
Name = CatalogBackup14d
PoolType = Backup
Recycle = Yes
AutoPrune = Yes
VolumeRetention = 14 days
MaximumVolumeJobs = 1
MaximumVolumes = 16
LabelFormat = CatalogVol-
}
# BEGIN ANSIBLE MANAGED BLOCK - include any file in the bee role files directory
@|"sh -c 'for f in /opt/bacula/etc/ansible.conf.d/director/*.conf ; do echo @${f} ; done'"
# END ANSIBLE MANAGED BLOCK - include any file in the bee role files directory
See also
Go back to Director Resource Types.
Go back to the Technical Reference for Director.