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

Re: how do you delete the entire openldap bdb database

Jason Joines wrote:
I ran slapadd to populate the 2.2 server. Some of my conversions were bad so I want to remove all the entries and run the population again. I delete everything in my database directory via "rm /var/lib/ldap/*", and verify everything is gone via "ls -l /var/lib/ldap/".
> However, when I then start the server back up, it
starts without errors and if I do a search I see all of the entries of my fully populated directory. "ls -l /var/lib/ldap/" reveals that all of the files have returned (__db.001 __db.002 __db.003 __db.004 __db.005 dn2id.bdb id2entry.bdb log.0000000001). I stop the server, delete them all again, and search the entire disk for these files finding nothing. When I start it again, they all return again.

These files are automatically created when you run any LDAP tool that interacts with the database. They don't have anything in them.

The easy way to erase everything is
 1. stop slapd
 2. rm -f /path/to/ldap/dir/*
 3. start slapd

Is that exactly what you've done?

How do I get back to a brand new, empty, directory without re-installing?

-- John Borwick Systems Administrator Wake Forest University | web http://www.wfu.edu/~borwicjh Winston-Salem, NC, USA | GPG key ID 56D60872

Attachment: signature.asc
Description: OpenPGP digital signature