• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

How do I Replace LDAP database with LDIF file

I have an OpenLDAP openldap-server-2.3.43 that I'm trying to replace the existing (very outdated) database with the LDIF file from the more current server.

I would generally use slapadd -l after stopping the services, but I've noticed that it does not remove records it just adds (which makes sense as it is slapADD).

My question: Is there a similar way to REPLACE the current database with the contents of the LDIF file?
0
gracewild
Asked:
gracewild
1 Solution
 
nociSoftware EngineerCommented:
How about creating a new database and then load the ldif?
The database can be found through the slapd.conf

in a statement like this:

directory       /var/lib/openldap-data

0
 
gracewildAuthor Commented:
Noci,

Thank you for your reply.  

I stopped the ldap service, then I renamed the openldap-data and created an empty openldap-data directory with ldap:ldap permissions and did the slapadd -l and started the ldap services.

Everything is as I need it.

Thank you
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now