ldbm as Backend for LDAP on Openexchange Server

Support knowledgebase (rsimai_slox_ldap)
Applies to

Openexchange Server: Version 4

Situation

You want to replace bdb with ldbm as Openldap2's backend.

Background

Single problems with the Berkeley db (bdb) in connection with the file systems reiserfs and ext3 have been reported. In these cases, the database file might be faulty, too. In addition, you can see (e.g. with 'top') that one or more slapd processes consume approximately 100% of the CPU power. A data dump by means of 'slapcat' produces no results and must be aborted with CTRL+C.

Procedure

This will work only if your database is in a faultless state. If it already contains some errors, proceed first as described in: "Recovering LDAP Data on Openexchange Server After a Database Error" (http://sdb.suse.de/en/sdb/html/rsimai_slox_db_recover.html)
  1. Stop LDAP.
    openexchange:~ # rcldap stop
    openexchange:~ # killall -9 slapd
    
  2. Make a backup of the database directory.
    openexchange:~ # cp -a /var/lib/ldap /root/ldap.backup
    
  3. Create a dump of the data.
    openexchange:~ # slapcat >/root/ldap_dump.ldif
    
  4. Remove the database files
    openexchange:~ # rm /var/lib/ldap/*
    
  5. Edit /etc/openldap/slapd.conf.
    Insert a comment sign before this line:
    #checkpoint      3000 10
    
    and change the entry
    database        bdb
    
    to
    database        ldbm
    
  6. Insert the dump again in the database.
    openexchange:~ # slapadd -l /root/ldap_dump.ldif
    
  7. Restart LDAP and test if data can be retrieved now.
    openexchange:~ # rcldap start
    openexchange:~ # ldapsearch -x
    

Automatic conversion of the database

Once you have updated the server to the current patch level, you may use the following script for an automatic conversion of the database:
/usr/share/doc/packages/imapweb32/tools/bdb2ldbm.sh

See also:
o Recovering LDAP Data on Openexchange Server After a Database Error

Keywords: LDAP, OPENEXCHANGESERVER, LDBM, BDB, BERKELEY

Categories: SuSE Linux IMAP Server

Feedback welcome: Send Mail to srsimai@suse.de (Please give the following subject: SDB-rsimai_slox_ldap)
SDB-rsimai_slox_ldap, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 29. Jan 2003
SuSE Linux AG - Last generated: 13. Mar 2003 by rsimai (sdb_gen 1.40.0)