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

Re: FW: Deleting the LDAP tree





--On Wednesday, June 22, 2005 11:38 AM -0400 "Boxall, Colin - OASAM CTR" <Boxall.Colin@dol.gov> wrote:

  Here is the script I came up with to do just what you are talking about.

# Stops slapd
/etc/init.d/ldap stop
# Removes the database files, the location of which is defined in your
# slapd.conf file, which is in /etc/openldap/

Personally, I would run db_recover to clean up the BDB environment before removing the files in the database directory. This is particularly important if you are using shared memory segments for part of the BDB environment.


rm /data/duckpond.dol/*
# Starts slapd
/etc/init.d/ldap start
# Imports dump.ldif, which is a ldif file, into the new database to
# populate it
/usr/sbin/slapadd -l /data/openldaptemp/dump.ldif

You should never run slapadd while slapd's running, the above lines are incorrect.


--Quanah


-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin