Symas OpenLDAP Knowledge Base

Upgrade from BDB/HDB to MDB

The upgrade requires the following steps:

  1. Backup your configuration files.
  2. Make the changes to a copy of your configuration files per the sections below for slapd.conf and cn=config
  3. Stop slapd
  4. Dump the database (slapcat)
  5. Remove the data files from the Openldap date directory 6, If using cn=config, load the updated configuration data
  6. Load the database from the dumped image
  7. Restart slapd


  1. Make the following changes to the /opt/symas/etc/openldap/slapd.conf file

     vi /opt/symas/etc/openldap/slapd.conf 

Change references to hdb in the module load and database sections to mdb

    # moduleload
    # moduleload
    database mdb
    # database bdb
    # database hdb

In the Database section comment out (#) the following:

    # Cachesize
    # Idlcachesize
    # Checkpoint

Beneath the commented out Checkpoint entry add the following line:

    Maxsize 10485760
    (Equals 10 MB in bytes - adjust as needed) 
  1. Save the slapd.conf file

  2. Restart Solserver/Slapd

     sudo /opt/symas/etc/solserver restart 
     sudo service solserver restart 
     sudo systemctl restart solserver.service 


  1. Stop Solserver/Slapd

     sudo /opt/symas/etc/solserver stop 
     sudo service solserver stop
     sudo systemctl stop solserver.service 
  2. Export the config database to a text file:

     slapcat -F /opt/symas/etc/openldap/slapd.d -l config.ldif -b
  3. Move the existing config database out of the way:

     mv /opt/symas/etc/openldap/slapd.d{,.old}
  4. Create a new, empty config database:

     mkdir /opt/symas/etc/openldap/slapd.d 
     chown --reference=/opt/symas/etc/openldap/slapd.d.old
     chmod --reference=/opt/symas/etc/openldap/slapd.d.old
  5. Edit the exported config.ldif

     vim /opt/symas/etc/openldap/config.ldif
  • Remove the olcSecurity setting (or add olcRootDN and olcRootPW to cn=config section)
  • Modify olcModuleLoad or to
  • Modify olcDatabase={1}BDB or HDB to olcDatabase={1}MDB
  • Remove olcDbCachesize, olcDbIDLcacheSize and olcDbCheckpoint attributes
  • Add olcDbMaxSize 10485760
  1. Save the modified config.ldif

  2. Load the edited LDIF into the new empty database:

     slapadd -F /opt/symas/etc/openldap/slapd.d -l config.ldif 
  3. Start Solserver/Slapd

     sudo /opt/symas/etc/solserver start 
     sudo service solserver start
     sudo systemctl start solserver.service