mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
14 lines
514 B
Text
14 lines
514 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
|
|
[[ ! -f /etc/ldap/slapd.conf ]] \
|
|
&& sudo mv /etc/ldap/slapd-yuno.conf /etc/ldap/slapd.conf
|
|
|
|
# Back up the configuration
|
|
sudo cp -a /etc/ldap/slapd.conf "${backup_dir}/slapd.conf"
|
|
sudo slapcat -b cn=config -l "${backup_dir}/cn=config.master.ldif"
|
|
|
|
# Back up the database
|
|
sudo slapcat -b dc=yunohost,dc=org -l "${backup_dir}/dc=yunohost-dc=org.ldif"
|