Slapd supports different backends, i.e. database types.
Backends can be roughly divided in three categories:
- those that actually store data:
- back-bdb
- back-hdb
- back-ldif (since 2.3)
- (back-ldbm is no longer supported as of 2.4)
- back-ndb (since 2.4.12)
- those that proxy other data storage systems:
- back-ldap
- back-meta
- back-passwd
- back-relay (since 2.3)
- back-sql
- those that dynamically generate the data:
- back-config (since 2.3)
- back-dnssrv
- back-monitor
- back-null
- back-perl
- (back-tcl is no longer supported as of 2.2)
- back-shell
The borderline between the categories may not be very well defined; for instance, back-dnssrv may be listed in the second category as well, since it essentially proxies DNS info, and back-monitor is a means to publish internally generated data in LDAP form rather than a storage system.
ando@sys-net.it, hyc@openldap.org, quanah@openldap.org |
Builtin and custom backends can be built as dynamic modules and loaded by means of the moduleload <module> statement.
Builtin backends: use the
--enable-<backend>=mod
switch at configure.
Custom backends: simply write a module that implements the backend functionalities and add a function
static BackendInfo bi;
int
init_module( int argc, char *argv[] )
{
memset( &bi, '\0', sizeof( bi ) );
bi.bi_type = "custom" ;
bi.bi_init = custom_back_initialize;
backend_add( &bi );
return 0;
}
so that the custom backend initialization function custom_back_initialize() is invoked when the module is loaded. Replace custom with your backend's name.
ando@sys-net.it, hyc@openldap.org |