Update to 2022-11-03 11:00

This commit is contained in:
Daniel Berteaud
2022-11-03 11:00:08 +01:00
parent adcb5de4f1
commit 724cb5641c
5 changed files with 18 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
#!/bin/sh
set -eo pipefail
{% if samba_role in ['dc', 'rodc'] %}
rm -rf /home/lbkp/samba
{% else %}
echo "Samba not running as a domain controller, no dump to remove"
{% endif %}

View File

@@ -2,6 +2,7 @@
set -eo pipefail
{% if samba_role in ['dc', 'rodc'] %}
LDB_MODULES_PATH=/usr/lib64/samba/ldb
export LDB_MODULES_PATH
@@ -20,3 +21,6 @@ for LDIF in $(find /var/lib/samba/private/ -type f -name \*.ldb); do
done
# Also take a more standard offline backup
samba-tool domain backup offline --targetdir=/home/lbkp/samba/offline/
{% else %}
echo "Samba isn't running as a domain controller, nothing to backup"
{% endif %}