October 2016
Beginner
406 pages
7h 50m
English
This recipe teaches you how to back up an OpenLDAP database by exporting the directory to an LDIF file, which can then be imported later to restore the database.
This recipe requires a CentOS system with a working network connection and administrative privileges either using the root account or sudo.
To back up an LDAP directory, export the directory using the slapcat utility:
slapcat -b "dc=ldap,dc=example,dc=com" -l backup.ldif
To rebuild the directory from an export, follow these steps:
service stop slapd.service
slapadd:
slapadd -f backup.ldif
ldap user:
chown -R ldap.ldap /var/lib/ldap/* ...Read now
Unlock full access