[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
backglue
That last query to openldap-software about using "one slapd to multiple
backends" finally got to me, so I whipped up this little toy. It will allow
any backends with a common suffix to be combined into a single tree. I
believe the most common reason to use it is if you originally had a single
database, but needed to split it for growth reasons. You still want to treat
the separated databases as a single searchable tree, and you don't want
referrals or other such cruft.
For example, we start with
database ldbm
suffix "o=University of Michigan,c=US"
directory ./test-db
rootdn "cn=Manager,o=University of Michigan,c=US"
rootpw secret
We decide this database is too big, and we split it:
database ldbm
suffix "ou=Alumni Association,ou=People,o=University of Michigan,c=US"
directory ./test-db/1
rootdn "cn=Manager,o=University of Michigan,c=US"
rootpw secret
database ldbm
suffix "o=University of Michigan,c=US"
directory ./test-db/2
rootdn "cn=Manager,o=University of Michigan,c=US"
rootpw secret
To make this all work, we just add glue:
database glue
suffix "ou=Alumni Association,ou=People,o=University of Michigan,c=US"
suffix "o=University of Michigan,c=US"
The glue clause should be ahead of the other databases in the slapd.conf
file. There are no other config keywords for glue, all it takes is suffixes
of other existing databases. For operations that affect only one entry, the
real backend is invoked without needing callbacks. For searches that can
generate multiple responses, callbacks are used to accumulate some info
about the search results.
I've tested this lightly with ldapadd, slapadd, and ldapsearch. Currently it
doesn't know how to handle referrals from subordinate searches, but
otherwise it's pretty complete. Please check it out and send me feedback.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support