Debian 12 bookworm
Sponsored Link

Bacula : Configure Components2023/08/09

 
Configure Bacula Components.
[1] Configure Bacula Director.
root@dlp:~#
vi /etc/bacula/bacula-dir.conf
Director {                            # define myself
  Name = dlp.srv.world-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/run/bacula"
  Maximum Concurrent Jobs = 20
  # line 25 : set password for Director daemon
  Password = "password"         # Console password
  Messages = Daemon
  # listening address
  DirAddress = 0.0.0.0
.....
.....

Job {
  Name = "RestoreFiles"
  Type = Restore
  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 101 : specify target directory for restoring
  Where = /tmp

.....
.....

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

FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    # line 168 : change
    File = "/var/lib/bacula/bacula.sql"

.....
.....

Client {
  Name = dlp.srv.world-fd
  Address = localhost
  FDPort = 9102
  Catalog = MyCatalog
  # line 178 : 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 204 : 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 206 : 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 243 : DB connection info
  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 304 : 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
}

.....
.....

# line 322 : tray-monitor password
Console {
  Name = dlp.srv.world-mon
  Password = "password"
  CommandACL = status, .status
}

root@dlp:~#
vi /etc/bacula/bconsole.conf
Director {
  Name = dlp.srv.world-dir
  DIRport = 9101
  address = localhost
  # password for Director
  Password = "password"
}
~
root@dlp:~#
systemctl restart bacula-dir

[2] Configure Bacula Storage.
root@dlp:~#
vi /etc/bacula/bacula-sd.conf
Storage {                             # definition of myself
  Name = dlp.srv.world-sd
  SDPort = 9103                  # Director's port
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/run/bacula"
  Plugin Directory = "/usr/lib/bacula"
  Maximum Concurrent Jobs = 20
  # line 24 : listening address
  SDAddress = 0.0.0.0

.....
.....

Director {
  Name = dlp.srv.world-dir
  # line 32 : set password for Storage daemon
  Password = "password"
}

.....
.....

# line 41 : tray-monitor password
Director {
  Name = dlp.srv.world-mon
  Password = "password"
  Monitor = yes
}

# change target directory for backup files (example below changes to [/tmp])

root@dlp:~#
sed -i -e "s/\/nonexistant\/path\/to\/file\/archive\/dir/\/tmp/g" /etc/bacula/bacula-sd.conf

root@dlp:~#
systemctl restart bacula-sd

[3] Configure Bacula File.
root@dlp:~#
vi /etc/bacula/bacula-fd.conf
Director {
  Name = dlp.srv.world-dir
  # line 19 : set password for File daemon
  Password = "password"
}

.....
.....

# line 28 : comment out now
Director {
  Name = bacula-mon
  Password = "password"
  Monitor = yes
}

.....
.....

FileDaemon {                          # this is me
  Name = dlp.srv.world-fd
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /run/bacula
  Maximum Concurrent Jobs = 20
  Plugin Directory = /usr/lib/bacula
  # line 42 : listening address
  FDAddress = 0.0.0.0

root@dlp:~#
systemctl restart bacula-fd

Matched Content