[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: upgrading an openldap v1 ldbm database to a v2 bdb database?

On Thu, Feb 12, 2009 at 04:50:48PM -0600, Kevin Martin wrote:

> So I've got an openldap v1 database with .oc.conf and .at.conf files describing the database that
> get included in the slapd.conf and I need to be able to migrate to a v2
> database (bdb or ldbm, I don't care which).  I find no mention of how to
> migrate the .oc and/or .at file entries to a usable .schema/(s) file(s)

Do you have any local additions to those files? If not, then you may
be able to import your data into an up-to-date server without doing
anything to the schema. (Assuming that you don't have binary data
or funny character sets anyway...)

OpenLDAP 1.x is really really old. It did not enforce the newer
rules about objectclasses, so you may find violations, particularly
if you have entries with both pilotPerson and inetOrgPerson.
These must be fixed in the data before you can import.

If you have local additions to the schema you will need to create
a new-format schema file and include it in the config. It is not that
hard if you start with an existing example. Put the attributes first
and the objectclasses at the end. Don't forget to allocate new OIDs.

> and I apparently can't ldapsearch and dump the schema from the old
> database (using ldapsearch  -b cn=schema -L â(objectclass=*)â )...it
> doesn't find a cn=schema.  I can copy the ldbm format ldap database
> lock, stock, and barrel from the old machine to a new machine but ldap2

Don't try to copy LDBM files to a new machine. They were fragile enough
to start with!

> won't allow me to include the .at.conf and .oc.conf files that describe
> the database.  I've also dumped the old database entries into a .ldif
> file at this point but have nowhere to import it to.  All constructive
> thoughts appreciated.

Take that LDIF and just try to import it on a 2.4.x server. If you get
errors then look at those individually.

|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |