summaryrefslogtreecommitdiffstats
path: root/roles/bacula-dir
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-01-22 02:12:24 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-01-22 02:12:45 +0100
commita092bfd947773281a23419ee0ab62358371b7166 (patch)
treeaab383fa77412bf0d99505d3b55488552137b28d /roles/bacula-dir
parenteb0a0a822328e8563ed8af67e4e9cd573d93b31a (diff)
tr/-/_/ in group names.
This avoids [DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
Diffstat (limited to 'roles/bacula-dir')
-rw-r--r--roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j212
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2 b/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
index ee01930..f2ffd17 100644
--- a/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
+++ b/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
@@ -5,83 +5,83 @@
Director { # define myself
Name = {{ inventory_hostname_short }}-dir
@|"sed -n '/^bconsole\\s/ {s//Password = /p; q}' /etc/bacula/passwords-dir"
Messages = Daemon
Working Directory = /var/lib/bacula
Pid Directory = /var/run/bacula
QueryFile = "/etc/bacula/scripts/query.sql"
Maximum Concurrent Jobs = 1
DirAddress = 127.0.0.1
DirPort = 9101
FDConnectTimeout = 5 min
SDConnectTimeout = 5 min
}
JobDefs {
Name = DefaultJob
Type = Backup
Level = Incremental
- Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+ Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
Messages = Standard
Accurate = yes
#Rerun Failed Levels = yes
Reschedule On Error = yes
Reschedule Interval = 17 min
Reschedule Times = 3
Pool = Default
Priority = 10
Write Bootstrap = "/var/lib/bacula/%n.bsr"
}
JobDefs {
Name = DefaultMySQLJob
Type = Backup
Level = Full
- Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+ Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
Messages = Standard
FileSet = SQL
Schedule = WeeklyCycleAfterBackup
Reschedule On Error = yes
Reschedule Interval = 17 min
Reschedule Times = 3
# This creates an ASCII copy of the databases
Client Run Before Job = "/usr/bin/mysqldump -r /var/lib/bacula/tmp/dump.sql --events --all-databases"
# This deletes the copy of the catalog
RunScript {
Runs On Client = yes
Runs On Success = yes
Runs On Failure = yes
Runs When = after
Command = "/bin/rm -f /var/lib/bacula/tmp/dump.sql"
}
Pool = database
Priority = 20
Write Bootstrap = "/var/lib/bacula/%n.bsr"
}
JobDefs {
Name = DefaultSlapdJob
Type = Backup
Level = Full
- Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+ Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
Messages = Standard
FileSet = LDAP
Schedule = WeeklyCycleAfterBackup
Reschedule On Error = yes
Reschedule Interval = 17 min
Reschedule Times = 3
# This creates an ASCII copy of the databases
Client Run Before Job = "/usr/local/sbin/slapcat-all.sh /var/lib/bacula/tmp"
# This deletes the copy of the catalog
RunScript {
Runs On Client = yes
Runs On Success = yes
Runs On Failure = yes
Runs When = after
Command = "/usr/bin/find /var/lib/bacula/tmp -type f -name '*.ldif' -delete"
}
Pool = database
Priority = 20
Write Bootstrap = "/var/lib/bacula/%n.bsr"
}
@@ -108,66 +108,66 @@ Job {
Full Backup Pool = mailboxes-full
Schedule = Mailboxes13WeeksCycle
Max Start Delay = 50 min # To avoid too many overlaps
Max Full Interval = 15 weeks
}
{% endfor %}
# Backup each machine
{% for fd in groups.all | sort %}
Job {
Name = {{ hostvars[fd].inventory_hostname_short }}
Client = {{ hostvars[fd].inventory_hostname_short }}-fd
JobDefs = DefaultJob
FileSet = FileSetRoot
Pool = {{ hostvars[fd].inventory_hostname_short }}
Priority = 15
Schedule = WeeklyCycle
}
{% endfor %}
-{% for fd in groups['MDA'] | union(groups['webmail']) | union(groups['lists']) | union(groups['bacula-dir']) | union(groups['nextcloud']) | sort %}
+{% for fd in groups['MDA'] | union(groups['webmail']) | union(groups['lists']) | union(groups['bacula_dir']) | union(groups['nextcloud']) | sort %}
Job {
Name = {{ hostvars[fd].inventory_hostname_short }}-mysql
Client = {{ hostvars[fd].inventory_hostname_short }}-fd
JobDefs = DefaultMySQLJob
}
{% endfor %}
{% for fd in groups['MDA'] | union(groups['MSA']) | union(groups['LDAP-provider']) | union(groups['MX']) | sort %}
Job {
Name = {{ hostvars[fd].inventory_hostname_short }}-slapd
Client = {{ hostvars[fd].inventory_hostname_short }}-fd
JobDefs = DefaultSlapdJob
}
{% endfor %}
#
# 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= {{ inventory_hostname_short }}-fd
FileSet = FileSetRoot
- Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+ Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
Pool = Default
Messages = Standard
# NOTE: Files are put on the client (FD) that is being restored.
Where = /tmp/bacula-restores
}
# 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 = WeeklyCycle
Run = Level=Full Messages=Quiet 1st sun at 01:05
Run = Level=Differential Messages=Quiet 2nd-5th sun at 01:05
Run = Level=Incremental Messages=Quiet mon-sat at 01:05
}
# Backup mailboxes: full backup every 3 months, hourly incremental backup
Schedule {
Name = Mailboxes13WeeksCycle
@@ -368,41 +368,41 @@ FileSet {
}
# Client (File Services) to backup
{% for fd in groups.all | sort %}
Client {
Name = {{ hostvars[fd].inventory_hostname_short }}-fd
Address = {{ ipsec[ hostvars[fd].inventory_hostname_short ] }}
FDPort = 9102
Catalog = MyCatalog
@|"sed -n '/^{{ hostvars[fd].inventory_hostname_short }}-fd\\s/ {s//Password = /p; q}' /etc/bacula/passwords-dir"
File Retention = 4 months
Job Retention = 5 months
AutoPrune = yes
#Maximum Bandwidth = 1mb/s
}
{% endfor %}
# Definition of file storage device
-{% for sd in groups['bacula-sd'] | sort %}
+{% for sd in groups['bacula_sd'] | sort %}
Storage {
Name = {{ hostvars[sd].inventory_hostname_short }}-sd
Address = {{ ipsec[ hostvars[sd].inventory_hostname_short ] }}
SDPort = 9103
@|"sed -n '/^{{ hostvars[sd].inventory_hostname_short }}-sd\\s/ {s//Password = /p; q}' /etc/bacula/passwords-dir"
Device = FileStorage
Media Type = File
}
{% endfor %}
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 3 months
Maximum Volume Bytes = 5GB
Label Format = "Default-${NumVols:p/4/0/r}"