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

Re: guide to upgrading from v1 to v2


I haven't upgraded from 1.x to 2.x but maybe I can help nonetheless.

On Friday 26 September 2003 03:45, Manuel Green wrote:
> So far this is what I have done.
> - Copied *.conf and /var/lib/ldap/* files across

OpenLDAP 1.x and OpenLDAP 2.x are not binary compatible 
when it comes to the data in the directory.
Simply copying the files in /var/lib/data/* won't work.
You need to dump the data from your 1.x, maybe tweak
them to match the 2.x schema and import them into 2.x.

To export from 1.x you may either use ldapsearch or ldbmcat.
the former needs your 1.x installation to run and may not give you
all operational attributes. About the latter I connot tell anything 
since I do not know it.
The tweaking of the data is necessary since 2.x checks the
syntax of the data entered into it more carefully (which was not
possible with the simple schema from 1.x).
To import can be done offline using slapadd or online using 

With slapd.conf it is similar.
2.x supports different/more config statements than 1.x.
So maybe adjusting a given 2.x slapd.conf to fit your needs
might be easier than upgrading a 1.x slapd.conf

> - Removed approx from slapd.conf since this is not
> supported in v2

> - Had to add 'include schema/core.schema' to fix
> 'index attribute "uid" undefined' message, probably a
> bad idea.

The files in schema/* are the files containing the schema
for the directory (when whey are included in slapd.conf).
They replace the at* and oc* fiels in the 1.x serieas that only
offered a quite coarse description of the schema.

You need to import any file from the schema/ subdirectory
into your slapd.conf that contains the syntax definition
of objectclasses or attributes you have had in your 1.x

> - starting slapd -d 256 gives me a stack of 'old
> objectclass format not supported.' messages yet it
> appears to start ok.

This is the error message that tells that the old
1.x schema files are not supported any more

> Will I have to recreate the schema/database from
> scratch and if so how do I then import the data from
> the old database?

If you only have standard objectclasses / attributes in your data
you only need to include the appropriate schema files into slapd.conf
With private attributes/objectclasses you need to write an RFC
conforming schema file for you extensions


Peter Marschall
eMail: peter@adpm.de