Ldap

LDAP

Liens

Divers

    • Indexing: Indexing greatly improves speed, offloading work from the CPU and disk to memory. Indexing (of types pres, eq, approx, and sub) is specified in the slapd.conf file. slapd indices are generated by slapindex (e.g., slapindex -v -f /usr/local/etc/openldap/slapd.conf). To ensure data consistency, make sure slapd is not running while generating indices.

    • Backups: slapcat -v -f /usr/local/etc/openldap/slapd.conf -l /path/to/backup/$(date +m%d).ldif). To ensure consistency, slapd should not be running during backups.

    • Restore:To do a full restore from backup, first stop slapd and remove all ldap data (e.g., rm /usr/local/var/openldap-data/ for source installations or rm /var/lib/ldap/* for Debian installations). Then use slapadd to load data from the ldif backup (e.g., slapadd -v -c -l example.ldif -f /usr/local/etc/openldap/slapd.conf for source installations or slapadd -v -c -l backup.ldif -f /etc/ldap/slapd.conf for Debian installations). Then run slapindex and start slapd.