Upgrade from BDB/HDB to MDB
The upgrade requires the following steps:
- Backup your configuration files.
 - Make the changes to a copy of your configuration files per the sections below for slapd.conf and cn=config
 - Stop 
slapd - Dump the database (
slapcat) - Remove the data files from the Openldap date directory 6, If using cn=config, load the updated configuration data
 - Load the database from the dumped image
 - Restart 
slapd 
Slapd.conf
- 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 back_mdb.la
    # moduleload back_bdb.la
    # moduleload back_hdb.la
    
    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) 
- Save the slapd.conf file
 - Restart Solserver/Slapd
 
        sudo /opt/symas/etc/solserver restart
    Or
        sudo service solserver restart 
    Or
        sudo systemctl restart solserver.service 
Slapd.d
- Stop Solserver/Slapd
 
        sudo /opt/symas/etc/solserver stop 
    Or
        sudo service solserver stop
    Or
        sudo systemctl stop solserver.service 
- Export the config database to a text file:
 
        slapcat -F /opt/symas/etc/openldap/slapd.d -l config.ldif -b
        cn=config
- Move the existing config database out of the way:
 
        mv /opt/symas/etc/openldap/slapd.d{,.old}
- Create a new, empty config database:
 
        mkdir /opt/symas/etc/openldap/slapd.d 
        chown --reference=/opt/symas/etc/openldap/slapd.d.old
        /opt/symas/etc/openldap/slapd.d 
        chmod --reference=/opt/symas/etc/openldap/slapd.d.old
        /opt/symas/etc/openldap/slapd.d 
- 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 back_bdb.la or back_hdb.la to back_mdb.la
 - Modify olcDatabase={1}BDB or HDB to olcDatabase={1}MDB
 - Remove olcDbCachesize, olcDbIDLcacheSize and olcDbCheckpoint attributes
 - Add olcDbMaxSize 10485760
 
- Save the modified config.ldif
 - Load the edited LDIF into the new empty database:
 
        slapadd -F /opt/symas/etc/openldap/slapd.d -l config.ldif 
- Start Solserver/Slapd
 
        sudo /opt/symas/etc/solserver start 
    Or
        sudo service solserver start
    Or
        sudo systemctl start solserver.service