21 February 2012

Backup OpenLDAP Ubuntu

The default database location is /usr/lib/ldap

It is recommended to backup to LDIF so it is transportable. Use slapcat to export.

slapcat -v -l /backups/ldapbackup.ldif


To restore use slapadd.


cd /usr/lib/ldap
rm *
slapadd -l ldapbackup.ldif


-v is verbose output
-l specifies the ldif format

No comments:

Post a Comment