LDAP database management tools

Creating a database offline

The second method of database creation is to do it offline, using the index generation tools described in ``The index-generation tools''. This method is best if you have many thousands of entries to create, which would take an unacceptably long time using the LDAP method described in ``Creating a database over LDAP''. These tools read the slapd configuration file and an input file containing a text representation of the entries to add. They produce the LDBM index files directly. There are several important configuration options you will want to be sure and set in the configuration file database definition first:

   suffix    dn
As described in ``Creating a database over LDAP'', this option says what entries are to be held by this database. You should set this to the DN of the root of the subtree you are trying to create. For example:
   suffix "o=Antbear, Lucid & Popp, c=US"
You should be sure to specify a directory where the index files should be created:
   directory    directory
For example:
   directory  /usr/local/antbear-slapd
Next, you probably want to increase the size of the in-core cache used by each open index file. For best performance during index creation, the entire index should fit in memory. If your data is too big for this, or your memory too small, you can still make it big and let the paging system do the work. This size is set with the following option:
   dbcachesize integer
For example:
   dbcachesize 50000000
This would create a cache of 50MB. Experiment with this number, and the degree of parallelism (see the explanation of the -j option to ldif2ldbm(1Mldap)), to see what works best for your system. Remember to turn this number back down once your index files are created and before you run slapd.

Finally, you need to specify which indexes you want to build. This is done by one or more index options:

   index    {attrlist | default} [pres,eq,approx,sub,none]
For example:
   index    cn,sn,uid    pres,eq,approx
   index    default      none
This would create presence, equality and approximate indexes for the cn, sn, and uid attributes, and no indexes for any other attributes. See ``The LDAP configuration file'' for more information on this option.
© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999