mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
15 lines
461 B
Text
15 lines
461 B
Text
backup_dir="$1/conf/ldap"
|
|
mkdir -p $backup_dir
|
|
|
|
# Fix for first jessie yunohost where slapd.conf is called slapd-yuno.conf
|
|
# without slapcat doesn't work
|
|
if [ ! -f /etc/ldap/slapd.conf ]
|
|
then
|
|
sudo mv /etc/ldap/slapd-yuno.conf /etc/ldap/slapd.conf
|
|
fi
|
|
|
|
sudo cp -a /etc/ldap/slapd.conf $backup_dir/
|
|
|
|
sudo slapcat -l $backup_dir/slapcat.ldif.raw
|
|
egrep -v "^entryCSN:" < $backup_dir/slapcat.ldif.raw > $backup_dir/slapcat.ldif
|
|
rm -f $backup_dir/slapcat.ldif.raw
|