openldap备份恢复 12345678910111213#在主节点上执行:slapcat -v -l openldap-backup.ldifcat > openldap-backup.synax << EOF/^creatorsName: /d/^modifiersName: /d/^modifyTimestamp: /d/^structuralobjectClass: /d/^createTimestamp: /d/^entryUUID: /d/^entryCSN: /dEOFcat openldap-backup.ldif | sed -f openldap-backup.synax > openldap-complete.ldiftar zcvf schema.tgz schema/ 在另一台机器上恢复: 1234567891011121314yum -y install openldap-servers openldap-clientscp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIGchown ldap. /var/lib/ldap/DB_CONFIGsystemctl enable slapdtar zcvf schema.tgz schema/systemctl stop slapd.service mkdir /data/backup/openldap mv /var/lib/ldap/* /data/backup/openldap/ slapadd -l openldap-complete.ldifcp -a /data/backup/openldap/DB_CONFIG /var/lib/ldap/ chown ldap:ldap -R /var/lib/ldapsystemctl start slapd