Just a quick instruction on howto restore an OpenLDAP server using a ‘ldif’-backup-file:
1. Setup the server
2. Configure the ‘slapd’ package, be sure to use the right database name. It’s a bit confusing: you enter it as ldaptree.company.com, but this will be used to create an empty database. Make sure it matches your backup ldif structure.
3. Make sure OpenLDAP is stopped
4. Read the backupdata into the OpenLDAP database using slapadd program
slapadd -c -l backup.ldif
The -c continues on errors, which might be necessary for example because the ‘root’ is already created. You can also run without it, and fix any errors by hand in the backup.ldif file. -l specifies the file to read from.
5. Fix permissions, make sure ‘openldap’ is both user/group owner
6. Start OpenLDAP and the server should be up & running again!
Good clear and correct………………….
Regards
Subhash C. Bijarniya
Thanks! Glad you like it!