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

Re: Deleting a database

If you simply just need to delete your database I suggest you just 
delete the *.dbb files (for example if your using ldbm as your back-



cd /path/to/slapd_dbb

# make a backup
if [ ! -d /path/to/backup_dir ];
  mkdir /path/to/backup_dir

# move dbb files to backup dir
/bin/mv *.dbb /path/to/backup_dir

# run update
/usr/local/openldap/sbin/slapadd -l ${MY_LDIF} -
f /path/to/openldap/slapd.conf -c > /var/log/myoutput 2>&1
<wait a few...depending on size>

Not the most elegant but should get you started. Hope that helps


----- Original Message -----
From: "Pieter De Wit" <pieter@vodacom.co.za>
Date: Friday, January 10, 2003 8:18 pm
Subject: Deleting a database

> Hello Everyone,
> I have tried to get hold of the General List, but can't seem to 
> get there.
> Sorry if this is off-topic.
> I need to delete all entries in my ldap database (using a shell 
> script,something like ldapsearch/ldapdelete). I have a lot of 
> changes that happen
> to my database and once a week I would like to rebuild the 
> database. I
> import/process the data from another ldap server (exchange) so the 
> re-create
> isn't a big problem (but replication is.....).
> Thanks,
> Pieter De Wit