[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: deleting a database

Jose Correia (J):
> Hi all
> it might sound stupid, but how does one delete an entire database so
> that one can rebuild it from scratch by running a new .ldif  file?
> I've looked at ldapdelete but it only seems to delete nodes...?

make shure slapd is stopped (e.g. '/etc/init.d/openldap stop')
and then you can just do a 'rm /var/lib/ldap-ldbm/*'
or whatever you've configured to be your directorypath for your 

> I've also tried deleting the contents in the database directory (after
> stopping slapd) and then restarting slapd and running my ldif file
> again... but it somehow still picks up the previous data.

Make sure you've really no slapd-processes running before you do a delete.
After deleting the contents as you claim, and described above, do an
offline import using the `slapadd` program with your new .ldif file.


Bjørn Ove Grøtan