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

Re: moving ldap database and upgrading



On 7/19/07, matthew sporleder <msporleder@gmail.com> wrote:
On 7/19/07, Maria McKinley <parody@u.washington.edu> wrote:
> On 7/19/07, John Drescher <drescherjm@gmail.com> wrote:
> > On 7/18/07, Maria McKinley <parody@u.washington.edu> wrote:
> > > Hi there,
> > >
> > > I am trying to move my ldap to a new machine to upgrade from
> > > openldap2.2 to openldap2.3. I moved all of my config files and created
> > > new certificates, but I am having difficulties. I am running on
> > > Debian, and if I start slapd by /etc/init.d/slapd start, I get:
> > >
> > Did you export the database with slapcat and reimport it with slapadd?
> >
> > Here are the instructions I use (taken from a local wiki):
> >
> >  Export the ldap database to an ldif file
> >
> > This is done using slapcat.
> >
> > [root@ldap1 root]# slapcat > /home/Administrator/ldap1.20061006.ldif
> >
> >
> > Stop the destination ldap server
> >
> > sysserv0 ~ # /etc/init.d/slapd stop
> >
> >
> > Backup the old ldap database folder
> >
> > We can use tar here.
> >
> > sysserv0 ~ # tar cjf slapd.tar.bz2 /var/lib/openldap-data/
> >
> >
> > Prepare the ldap folder
> >
> > sysserv0 ~ # rm /var/lib/openldap-data/*
> > sysserv0 ~ # tar xjf /root/slapd.tar.bz2 var/lib/openldap-data/DB_CONFIG
>
> I don't get this. You tar the entire openldap-data folder, but then
> empty it into a new directory called DB_CONFIG? This step I was not
> doing, so it must be what is wrong, but it doesn't make sense to me.
>


tar xf file.tar named_file will extract named_file FROM file.tar.

It's another way of saying "backup & restore your DB_CONFIG file."
http://www.openldap.org/faq/index.cgi?_highlightWords=db_config&file=1073
http://www.openldap.org/faq/index.cgi?_highlightWords=db_config&file=1072


I see, I should have read the tar error message more carefully. I have no DB_CONFIG file in my old database, so I think this can't be the problem unless the new version of ldap requires it.

~maria