Integrate and document backup scripts

This commit is contained in:
paul 2019-11-10 09:53:21 +01:00
parent 141ab43caa
commit 0ee90a1355
6 changed files with 25 additions and 18 deletions
scripts

13
scripts/dump Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
conf=${CONFDIR:-/data/slapd.d}
# typically, 0 is configuration, and 1 is the main database
db_id=${1:-1} # default value is 1.
if [ "${db_id}" -ge 0 && "${db_id}" -ls 10 ] ; then
slapcat -F ${conf} -n ${db_id}
else
echo "database number is invalid" > /dev/stderr
exit 1
fi