Need to backup your LDAP directory? Export it? Import or restore it again?
To backup or export your LDAP directory use:
$ ldapsearch -w password -D "cn=admin,dc=domain,dc=com" -b "dc=domain,dc=com" -H ldap://ldap.domain.com -LLL > ldap_dump-`date +%Y-%m-%d-%H-%M-%S`.ldif
To restore/import it back use:
$ ldapadd -w password -D "cn=admin,dc=domain,dc=com" -H ldap://ldap.domain.com -f ldap_dump-XXXX-XX-XX-XX-XX-XX.ldif