mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
15 lines
486 B
Text
15 lines
486 B
Text
backup_dir="$1/conf/ldap"
|
|
sudo 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
|
|
sudo bash -c "egrep -v '^entryCSN:' < $backup_dir/slapcat.ldif.raw > $backup_dir/slapcat.ldif"
|
|
sudo rm -f $backup_dir/slapcat.ldif.raw
|