bundlewrap/bundles/openldap/files/slapdump

14 lines
336 B
Text
Raw Permalink Normal View History

2021-12-17 10:51:33 +00:00
#!/bin/bash
# ^^^^ Needed for fancy co-processes.
db=$1
[[ -z "$db" ]] && { echo "Usage: $0 <db>" >&2; exit 1; }
slapcat -b "$db" -f /etc/ldap/slapd.conf \
1> >(gzip >/var/tmp/ldapdumps/"$db".gz) \
2> >(grep -v \
-e "no DB_CONFIG file found in directory" \
-e "Expect poor performance" \
>&2)