summaryrefslogtreecommitdiffstats
path: root/roles/bacula-dir
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-05-26 21:09:33 +0200
committerGuilhem Moulin <guilhem@fripost.org>2020-05-26 21:26:45 +0200
commite54d34a84d2ee4526c301fee4e905891cb2d819a (patch)
tree58c31c9b25c67b5a652064ebcbf219f2776820bf /roles/bacula-dir
parenta37de918998af826ae38a1575bacef87c0bf902d (diff)
slapcat-all.sh: Use ldapsearch(1) to generate the LDIF.
Unlike slapcat(1) it doesn't require write access to ~openldap, so we don't have to weaken bacula-fd.service.
Diffstat (limited to 'roles/bacula-dir')
-rw-r--r--roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j22
1 files changed, 1 insertions, 1 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 0ab213b..3e37614 100644
--- a/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
+++ b/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
@@ -62,41 +62,41 @@ JobDefs {
JobDefs {
Name = DefaultSlapdJob
Type = Backup
Level = Full
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"
+ Command = "/usr/bin/find /var/lib/bacula/tmp -type f \( -name '*.ldif' -o -name 'slapd-*' \) -delete"
}
Pool = database
Priority = 20
Write Bootstrap = "/var/lib/bacula/%n.bsr"
}
# Backup the director
Job {
Name = {{ inventory_hostname_short }}-dir
Client = {{ inventory_hostname_short }}-fd
JobDefs = DefaultJob
FileSet = BaculaHome
Schedule = WeeklyCycle
}
# Backup the mailboxes
{% for h in groups.IMAP | sort %}
Job {
Name = {{ hostvars[h].inventory_hostname_short }}-mailboxes