Symas OpenLDAP Knowledge Base

HDB to MDB Conversion

Backup Current Database(s)

Using slapcat ([exampleTODO]) backup your hdb database. The rest of this guide assumes NO CHANGES are made to the LDIF output.

If you are using slapd.conf (static configuration) and make no changes vi LDAP commands, copy your current slapd.conf and any other files it includes. Also make an archive of your custom-schema folder if you have one.

If you are using cn=config (dynamic configuration), use slapcat to backup your configuratoin to an LDIF file (example).

On a Test Instance

Install OpenLDAP (InstructionsTODO).

If you use slapd.conf:

  1. Put your copy of slapd.conf with any includes into /opt/symas/etc/openldap/.
  2. Create a “custom-schema” directory in that folder if you use them and put the custom schema files into that folder.
  3. In the /opt/symas/etc/openldap/slapd.conf:
    • Change references to hdb in the module load and database sections from “hdb” to “mdb”`
    • in slapd.conf, comment out (with “#”) the lines for “Cachesize”, “Idlcachesize”, and “Checkpoint”
    • Below the line for Checkpoint, add the following (indicating the maximum size of the database will be 10Mb (tiny). [FIXME to 1GB but showing 10GB value].
    Maxsize     10485760  
  4. save the slapd.conf file.
  5. Verify that the configuration won’t fail when starting OpenLDAP:
sudo slaptest -v -f /opt/symas/etc/openldap/slapd.conf 
  1. Restart slapd
sudo systemctl start slapd
sudo systemctl status slapd
  1. Verify from systemctl status output that slapd is running properly.
  2. Load the data from the backup taken earlier (ExampleTODO)
  3. Run your tests to verify that this server is running correctly.
  4. Once that’s all working, you can begin to migrate QA or production servers according to your update plan.

For cn=config

TODO