<commit_before># DO NOT EDIT - Managed by Puppet
#
# Bacula Director Master Configuration
#   for <%= @director_server_real %>

# Define the name of this director so other clients can
# connect to it and work with our system
Director {
  Name = "<%= @director_server_real -%>:director"
  Query File = "/etc/bareos/scripts/query.sql"
  Working Directory = "/var/lib/bareos"
  PID Directory = "/var/lib/bareos"
<% if @plugin_dir -%>
  Plugin Directory = <%= @plugin_dir %>
<% end -%>
  Maximum Concurrent Jobs = 5
  Password = "<%= @director_password -%>"
  Messages = "<%= @director_server_real -%>:messages:daemon"
<% if @use_tls -%>
  TLS Enable = yes
  TLS Require = <%= @tls_require %>
  TLS Verify Peer = <%= @tls_verify_peer %>
<% @tls_allowed_cn.each do |allowed_cn| -%>
  TLS Allowed CN = "<%= allowed_cn %>"
<% end -%>
<% if @tls_ca_cert -%>
  TLS CA Certificate File = <%= @tls_ca_cert %>
<% end -%>
<% if @tls_ca_cert_dir -%>
  TLS CA Certificate Dir = <%= @tls_ca_cert_dir %>
<% end -%>
  TLS Certificate = <%= @tls_cert %>
  TLS Key = <%= @tls_key %>
<% end -%>
}

# This is where the catalog information will be stored (basically
# this should be how to connect to whatever database we're using)
Catalog {
  Name = "<%= @director_server_real -%>:<%= @db_backend -%>"
  dbname = "<%= @db_database -%>"; dbdriver = <%= @db_backend %>
  <% if @db_backend == 'mysql' # postgres and sqlite don't require these settings -%>
  dbaddress = <%= @db_host %>; dbport = <%= db_port %>; user = <%= db_user %>; password = <%= <PASSWORD> %>
  <% end -%>
}

# Configure how the directory will log and/or send messages. This
# should should be for just about everything.
Messages {
  Name = "<%= @director_server_real -%>:messages:standard"
  Mail Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula %t %e (for %c)\" %r"
  Operator Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula Intervention Required (for %c)\" %r"
<% if @mail_to_real -%>
  Mail = <%= @mail_to_real -%> = all, !skipped
<% end -%>
<% if @mail_to_on_error -%>
  Mail On Error = <%= @mail_to_on_error -%> = all, !skipped
<% end -%>
  Operator = <%= @mail_to_operator_real -%> = mount
  Console = all, !skipped, !saved
  # WARNING! the following will create a file that you must cycle from
  #          time to time as it will grow indefinitely. However, it will
  #          also keep all your messages if they scroll off the console.
  Append = "/var/log/bareos/<%= @director_server_real -%>:director.log" = all, !skipped
  Catalog = all
}

# These are messages directly from the various daemons themselves.
Messages {
  Name = "<%= @director_server_real -%>:messages:daemon"
  Mail Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula Notice (from Director %d)\" %r"
  Mail = <%= @mail_to_daemon_real -%> = all, !skipped
  Console = all, !skipped, !saved
  Append = "/var/log/bareos/<%= @director_server_real -%>:director.log" = all, !skipped
}

<% if @use_console -%>
# Restricted console used by tray-monitor to get the status of the director
Console {
  Name = "<%= @director_server_real -%>:monitor:director"
  Password = "<%= console_password -%>"
  CommandACL = status, .status
}
<% end -%>

# DEFAULT STORAGE SERVER ------------------------------------------------------
# All the clients will define their own Storage Daemon configuration as they
# will connect to a dedicated File device on that director (to aid Pool & Volume
# management along with concurrent access). This section will define a default
# Storage Daemon to connect to (using the standard FileStorage device) and a
# Pool which will be used with that as well.
Storage {
  Name = "<%= @storage_server_real -%>:storage:default"
  Address = <%= @storage_server_real %>
  Password = "<%= <PASSWORD> -%>"
  Device = "DefaultFileStorage"
  Media Type = File
<% if @use_tls -%>
  TLS Enable = yes
  TLS Require = <%= @tls_require %>
<% if @tls_ca_cert -%>
  TLS CA Certificate File = <%= @tls_ca_cert %>
<% end -%>
<% if @tls_ca_cert_dir -%>
  TLS CA Certificate Dir = <%= @tls_ca_cert_dir %>
<% end -%>
  TLS Certificate = <%= @tls_cert %>
  TLS Key = <%= @tls_key %>
<% end -%>
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a month (in
  # theory the same time period for weekly backups from the clients)
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}
Pool {
  Name = "<%= @storage_server_real -%>:pool:default.full"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.full.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a year
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_full %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_full %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default.differential"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.diff.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of fourty days
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_diff %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_diff %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default.incremental"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.incr.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of 40 days
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_incr %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_incr %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:catalog"
  # All Volumes will have the format director.catalog.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  Label Format = "${Job}.<%= @director_server_real -%>.${Counter<%= @director_server_real.split('.')[0].capitalize -%>Catalog+:p/3/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a month (in
  # theory the same time period for weekly backups from the clients)
  Recycle = Yes
  Auto Prune = Yes
  # We have no limit on the number of volumes, but we will simply set that
  # we should keep at least one weeks worth of backups of the database
  Volume Retention = 1 Week
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

# Create a Counter which will be used to label the catalog volumes on the system
Counter {
  Name    = "Counter<%= @director_server_real.split('.')[0].capitalize -%>Catalog"<commit_msg>Change default Volume label format for catalog backup<commit_after># DO NOT EDIT - Managed by Puppet
#
# Bacula Director Master Configuration
#   for <%= @director_server_real %>

# Define the name of this director so other clients can
# connect to it and work with our system
Director {
  Name = "<%= @director_server_real -%>:director"
  Query File = "/etc/bareos/scripts/query.sql"
  Working Directory = "/var/lib/bareos"
  PID Directory = "/var/lib/bareos"
<% if @plugin_dir -%>
  Plugin Directory = <%= @plugin_dir %>
<% end -%>
  Maximum Concurrent Jobs = 5
  Password = "<%= <PASSWORD> -%>"
  Messages = "<%= @director_server_real -%>:messages:daemon"
<% if @use_tls -%>
  TLS Enable = yes
  TLS Require = <%= @tls_require %>
  TLS Verify Peer = <%= @tls_verify_peer %>
<% @tls_allowed_cn.each do |allowed_cn| -%>
  TLS Allowed CN = "<%= allowed_cn %>"
<% end -%>
<% if @tls_ca_cert -%>
  TLS CA Certificate File = <%= @tls_ca_cert %>
<% end -%>
<% if @tls_ca_cert_dir -%>
  TLS CA Certificate Dir = <%= @tls_ca_cert_dir %>
<% end -%>
  TLS Certificate = <%= @tls_cert %>
  TLS Key = <%= @tls_key %>
<% end -%>
}

# This is where the catalog information will be stored (basically
# this should be how to connect to whatever database we're using)
Catalog {
  Name = "<%= @director_server_real -%>:<%= @db_backend -%>"
  dbname = "<%= @db_database -%>"; dbdriver = <%= @db_backend %>
  <% if @db_backend == 'mysql' # postgres and sqlite don't require these settings -%>
  dbaddress = <%= @db_host %>; dbport = <%= db_port %>; user = <%= db_user %>; password = <%= db_password %>
  <% end -%>
}

# Configure how the directory will log and/or send messages. This
# should should be for just about everything.
Messages {
  Name = "<%= @director_server_real -%>:messages:standard"
  Mail Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula %t %e (for %c)\" %r"
  Operator Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula Intervention Required (for %c)\" %r"
<% if @mail_to_real -%>
  Mail = <%= @mail_to_real -%> = all, !skipped
<% end -%>
<% if @mail_to_on_error -%>
  Mail On Error = <%= @mail_to_on_error -%> = all, !skipped
<% end -%>
  Operator = <%= @mail_to_operator_real -%> = mount
  Console = all, !skipped, !saved
  # WARNING! the following will create a file that you must cycle from
  #          time to time as it will grow indefinitely. However, it will
  #          also keep all your messages if they scroll off the console.
  Append = "/var/log/bareos/<%= @director_server_real -%>:director.log" = all, !skipped
  Catalog = all
}

# These are messages directly from the various daemons themselves.
Messages {
  Name = "<%= @director_server_real -%>:messages:daemon"
  Mail Command = "/usr/sbin/bsmtp -h localhost -f bareos@<%= scope.lookupvar('::fqdn') -%> -s \"Bacula Notice (from Director %d)\" %r"
  Mail = <%= @mail_to_daemon_real -%> = all, !skipped
  Console = all, !skipped, !saved
  Append = "/var/log/bareos/<%= @director_server_real -%>:director.log" = all, !skipped
}

<% if @use_console -%>
# Restricted console used by tray-monitor to get the status of the director
Console {
  Name = "<%= @director_server_real -%>:monitor:director"
  Password = "<%= console_password -%>"
  CommandACL = status, .status
}
<% end -%>

# DEFAULT STORAGE SERVER ------------------------------------------------------
# All the clients will define their own Storage Daemon configuration as they
# will connect to a dedicated File device on that director (to aid Pool & Volume
# management along with concurrent access). This section will define a default
# Storage Daemon to connect to (using the standard FileStorage device) and a
# Pool which will be used with that as well.
Storage {
  Name = "<%= @storage_server_real -%>:storage:default"
  Address = <%= @storage_server_real %>
  Password = "<%= <PASSWORD> -%>"
  Device = "DefaultFileStorage"
  Media Type = File
<% if @use_tls -%>
  TLS Enable = yes
  TLS Require = <%= @tls_require %>
<% if @tls_ca_cert -%>
  TLS CA Certificate File = <%= @tls_ca_cert %>
<% end -%>
<% if @tls_ca_cert_dir -%>
  TLS CA Certificate Dir = <%= @tls_ca_cert_dir %>
<% end -%>
  TLS Certificate = <%= @tls_cert %>
  TLS Key = <%= @tls_key %>
<% end -%>
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a month (in
  # theory the same time period for weekly backups from the clients)
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}
Pool {
  Name = "<%= @storage_server_real -%>:pool:default.full"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.full.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a year
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_full %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_full %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default.differential"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.diff.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of fourty days
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_diff %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_diff %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:default.incremental"
  # All Volumes will have the format standard.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  # We won't use a counter format for this at the moment.
  Label Format = "${Job}.incr.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of 40 days
  # Note the files for the old volumes will still remain on the disk but will
  # be truncated to a zero size.
  Recycle = No
  Auto Prune = <%= @volume_autoprune_incr %>
  Action On Purge = Truncate
  Volume Retention = <%= @volume_retention_incr %>
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

Pool {
  Name = "<%= @storage_server_real -%>:pool:catalog"
  # All Volumes will have the format director.catalog.date.time to ensure they
  # are kept unique throughout the operation and also aid quick analysis
  Label Format = "${Job}.<%= @director_server_real -%>.${Year}${Month:p/2/0/r}${Day:p/2/0/r}.${Hour:p/2/0/r}${Minute:p/2/0/r}"
  Pool Type = Backup
  # Clean up any we don't need, and keep them for a maximum of a month (in
  # theory the same time period for weekly backups from the clients)
  Recycle = Yes
  Auto Prune = Yes
  # We have no limit on the number of volumes, but we will simply set that
  # we should keep at least one weeks worth of backups of the database
  Volume Retention = 1 Week
  # Don't allow re-use of volumes; one volume per job only
  Maximum Volume Jobs = 1
}

# Create a Counter which will be used to label the catalog volumes on the system
Counter {
  Name    = "Counter<%= @director_server_real.split('.')[0].capitalize -%>Catalog"
{'fraction_non_alphanumeric': 0.1407468198604842, 'fraction_numerical': 0.0055689079078492295, 'mean_word_length': 3.546908315565032, 'pattern_counts': {'":': 0, '<': 168, '<?xml version=': 0, '>': 168, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7124230', 'n_tokens_mistral': 6021, 'n_tokens_neox': 5533, 'n_words': 2000}