# $OpenLDAP$
-# Copyright 2007-2008 The OpenLDAP Foundation, All Rights Reserved.
+# Copyright 2007-2012 The OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT.
H1: Backends
+Backends do the actual work of storing or retrieving data in response
+to LDAP requests. Backends may be compiled statically into {{slapd}},
+or when module support is enabled, they may be dynamically loaded.
+
+If your installation uses dynamic modules, you may need to add the
+relevant {{moduleload}} directives to the examples that follow. The
+name of the module for a backend is usually of the form:
+
+> back_<backend name>.la
+
+So for example, if you need to load the {{hdb}} backend, you would configure
+
+> moduleload back_hdb.la
H2: Berkeley DB Backends
> include ./schema/core.schema
>
> database ldif
-> directory "./ldif"
+> directory ./ldif
> suffix "dc=suretecsystems,dc=com"
> rootdn "cn=LDIF,dc=suretecsystems,dc=com"
> rootpw LDIF
-You'll notice that when compared to examples below, there is no:
-
-> moduleload back_ldif.la
-
-directive. This is because {{back_ldif}} is always built in by default as it is
-used by {{slapd-config(5)}}, which again is built in by default.
-
If we add the {{dcObject}} for {{dc=suretecsystems,dc=com}}, you can see how this
is added behind the scenes on the file system:
{{slapd-ldif}}(5)
+H2: MDB
+
+
+H3: Overview
+
+The {{mdb}} backend to {{slapd}}(8) is the upcoming primary backend for a
+normal {{slapd}} database. It uses OpenLDAP's own Memory-Mapped Database ({{TERM:MDB}})
+library to store data and is intended to replace the Berkeley DB backends.
+
+It supports indexing like the BDB backends, but it uses no caching and requires
+no tuning to deliver maximum search performance. Like {{hdb}}, it is also
+fully hierarchical and supports subtree renames in constant time.
+
+H3: back-mdb Configuration
+
+Unlike the BDB backends, the MDB backend can be instantiated with very few
+configuration lines:
+
+> include ./schema/core.schema
+>
+> database mdb
+> directory ./mdb
+> suffix "dc=suretecsystems,dc=com"
+> rootdn "cn=mdb,dc=suretecsystems,dc=com"
+> rootpw mdb
+> maxsize 1073741824
+
+In addition to the usual parameters that a minimal configuration requires, the MDB
+backend requires a maximum size to be set. This should be the largest that
+the database is ever anticipated to grow (in bytes). The filesystem must also
+provide enough free space to accommodate this size.
+
+H3: Further Information
+
+{{slapd-mdb}}(5)
+
H2: Metadirectory
needed to instantiate a monitor backend:
> include ./schema/core.schema
->
-> modulepath /usr/local/libexec/openldap
-> moduleload back_monitor.la
>
> database monitor
> rootdn "cn=monitoring,cn=Monitor"
This has to be one of the shortest configurations you'll ever do. In order to
test this, your {{F: slapd.conf}} file would look like:
-> modulepath /usr/local/libexec/openldap
-> moduleload back_null.la
-
> database null
> suffix "cn=Nothing"
> bind on
-The first two directives are only applicable if you've enabled module support and
-haven't "built-in" {{slapd-null(5)}} support (why would you?).
-
{{bind on}} means:
{{"Allow binds as any DN in this backend's suffix, with any password. The default is "off"."}}
> include ./schema/core.schema
>
-> modulepath /usr/local/libexec/openldap
-> moduleload back_passwd.la
->
> database passwd
> suffix "cn=passwd"