FreeBSD 14
Sponsored Link

Bacula : Configure Components2024/09/19

 

Configure Bacula Components.

[1] Configure Bacula Director.
root@dlp:~ #
vi /usr/local/etc/bacula/bacula-dir.conf
Director {                            # define myself
  # line 19 : change Director daemon name
  # any name you like but it needs all specified Director daemon name are the same
  Name = dlp.srv.world-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/usr/local/share/bacula/query.sql"
  WorkingDirectory = "/var/db/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 20
  # line 25 : set password for Director daemon
  Password = "password"         # Console password
  Messages = Daemon
}

.....
.....

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  # line 33 : specify File daemon name
  # this name is the same one with the File daemon name you will set later
  Client = dlp.srv.world-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"

.....
.....

Job {
  Name = "RestoreFiles"
  Type = Restore
  # line 93 : specify File daemon name
  # this name is the same one with the File daemon name you will set later
  Client = dlp.srv.world-fd
  Storage = File1
  # The FileSet and Pool directives are not used by Restore Jobs
  # but must not be removed
  FileSet="Full Set"
  Pool = File
  Messages = Standard
  # line 100 : target directory for restoring
  Where = /tmp/bacula-restores

.....
.....

    # line 125 : specify backup target directory
    File = /etc
  }

.....
.....

Client {
  # line 173 : specify File daemon name
  # this name is the same one with the File daemon name you will set later
  Name = dlp.srv.world-fd
  Address = localhost
  FDPort = 9102
  Catalog = MyCatalog
  # line 177 : password for File daemon
  Password = "password"          # password for FileDaemon
  File Retention = 60 days            # 60 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

.....
.....

Autochanger {
  Name = File1
# Do not use "localhost" here
  # line 203 : change to FQDN of your host according to the note
  Address = dlp.srv.world             # N.B. Use a fully qualified name here
  SDPort = 9103
  # line 205 : password for Storage daemon
  Password = "password"
  Device = FileChgr1
  Media Type = File1
  Maximum Concurrent Jobs = 10        # run up to 10 jobs a the same time
  Autochanger = File1                 # point to ourself
}

.....
.....

Catalog {
  Name = MyCatalog
  # line 242 : set DB connection password
  dbname = "bacula"; dbuser = "bacula"; dbpassword = "password"
}

.....
.....

Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  # line 303 : volume retention term
  Volume Retention = 365 days         # one year
  # max volume size
  Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  # max volume number
  Maximum Volumes = 100               # Limit number of Volumes in Pool
  # prefix for volume files
  Label Format = "Vol-"               # Auto label
}

.....
.....

Console {
  # line 320 : change tray-monitor name
  # any name you like but it needs all specified tray-monitor name are the same
  Name = dlp.srv.world-mon
  # password for tray-monitor
  Password = "password"
  CommandACL = status, .status
}

root@dlp:~ #
vi /usr/local/etc/bacula/bconsole.conf
Director {
  # change Director daemon name
  # any name you like but it needs all specified Director daemon name are the same
  Name = dlp.srv.world-dir
  DIRport = 9101
  address = localhost
  # password for Director
  Password = "password"
}
~
root@dlp:~ #
service bacula-dir enable

bacula_dir enabled in /etc/rc.conf
root@dlp:~ #
service bacula-dir start

Starting bacula_dir.
[2] Configure Bacula Storage.
root@dlp:~ #
vi /usr/local/etc/bacula/bacula-sd.conf
Storage {
  # line 18 : change Storage daemon name
  # any name you like but it needs all specified Storage daemon name are the same
  Name = dlp.srv.world-sd
  SDPort = 9103                  # Director's port
  WorkingDirectory = "/var/db/bacula"
  Pid Directory = "/var/run"
  Plugin Directory = "/usr/local/lib"
  Maximum Concurrent Jobs = 20
  Encryption Command = "/usr/local/share/bacula/key-manager.py getkey"
}

Director {
  # line 31 : specify Director daemon name
  # this name is the same one with the Director daemon name you set above
  Name = dlp.srv.world-dir
  # set password for Director daemon
  Password = "password"
}

.....
.....

Director {
  # line 40 : specify tray-monitor name
  # this name is the same one with the tray-monitor name you set above
  Name = dlp.srv.world-mon
  # password for tray-monitor
  Password = "password"
  Monitor = yes
}

root@dlp:~ #
service bacula-sd enable

bacula_sd enabled in /etc/rc.conf
root@dlp:~ #
service bacula-sd start

Starting bacula_sd.
[3] Configure Bacula File.
root@dlp:~ #
vi /usr/local/etc/bacula/bacula-fd.conf
Director {
  # line 18 : specify Director daemon name
  # this name is the same one with the Director daemon name you set above
  Name = dlp.srv.world-dir
  # password for Director daemon
  Password = "password"
}

.....
.....

Director {
  # line 27 : specify tray-monitor name
  # this name is the same one with the tray-monitor name you set above
  Name = dlp.srv.world-mon
  # password for tray-monitor
  Password = "password"
  Monitor = yes
}

FileDaemon {
  # line 36 : change File daemon name
  # any name you like but it needs all specified File daemon name are the same
  Name = dlp.srv.world-fd
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/db/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 20
  Plugin Directory = /usr/local/lib
}

root@dlp:~ #
service bacula-fd enable

bacula_fd enabled in /etc/rc.conf
root@dlp:~ #
service bacula-fd start

Starting bacula_fd.
Matched Content