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

RE: Converting 2.0.x databases to 2.1.x.. without LDIFs



--- Howard Chu <hyc@highlandsun.com> wrote:
> > -----Original Message-----
> > From: owner-openldap-software@OpenLDAP.org
> > [mailto:owner-openldap-software@OpenLDAP.org]On
> Behalf Of Keith
> 
> > Hello
> >    I have recently upgraded my linux version, and
> in
> > the process openldap went from 2.0.27-2.7.3 to
> > 2.1.22-8. I sadly did not dump my openldap
> databases
> > to LDIF beforehand with slapcat (that little
> system
> > upgrade detail was lost in the sea of upgrade
> > information). So now im stuck with 2.0.x gdbm
> > databases that I need to convert to openldap 2.1
> > format...
> >
> > In the quest to make this happen I tried to apply
> this
> > 2.1 command that appears to be for converting 2.0
> gdbm
> > (But I reserve the right to be very very wrong in
> that
> > observation): slapadd-slapd-2.0-gdbm
> 
> Since this tool was not provided by the OpenLDAP
> project, I can't be certain
> of its purpose, 

For reference: The
slapcat-slapd-2.0-gdbm/slapadd-slapd-2.0-gdbm tools
are packed with in the fedora openldap 2.1.22-8 rpm.

>but I note that "slapadd" is used
> for adding entries to
> databases. "slapcat" is used for dumping their
> contents. See if you have a
> corresponding slapcat tool available.
> 

Your comments helped me greatly, thank you very much
Howard. 

For reference to others who may be caught out with a
system upgrade moving from openldap 2.0 to 2.1: I
converted my 2.0 ldap databases after upgrading to 2.1
by following these steps: 

- Extracting all the old schema files from an old
archive to /etc/openldap/schema  (move your new
schemas out the way first) and using my old slapd.conf
file.

- Used the following command to convert to ldif:
   slapcat-slapd-2.0-gdbm -d -1 -f
/etc/openldap/slapd.conf -l ldiffile

- Moved back the new schemas, and updated the
slapd.conf file to the newer version and new database
location, then imported ldif file with:
   slapadd -v  -d 256 -l ldiffile

Ok, it didn't go that smoothly. I used
/redhat/kerberosobject.schema in v2.0.x, which now
complained about AttributeType not found "krbName" in
v2.1. After a brief French lesson (
http://www.int-evry.fr/mci/user/procacci/ldap/Ldap_int005.html
)
the fix is just to copy the krbName attribute out of
the old core.schema into the top of the
kerberosobject.schema.

Hope this saves someone a few hours.

Thanks again.

Cheers,
Keith.

__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html