Integrate and document backup scripts
This commit is contained in:
parent
141ab43caa
commit
0ee90a1355
6 changed files with 25 additions and 18 deletions
scripts
13
scripts/dump
Executable file
13
scripts/dump
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue