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

Re: moving ldap database and upgrading



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.

thanks,
maria




Import the ldap database

sysserv0 ~ # slapadd -l /home/Administrator/ldap1.20061006.ldif
sysserv0 ~ # chown ldap:ldap /var/lib/openldap-data/*


Start the destination ldap server

sysserv0 ~ # /etc/init.d/slapd start

John



--
Maria Mckinley
Scientific Programmer
Shadlen Lab
Physiology and Biophysics
Box 357290
University of Washington
(206) 616-3923
parody@u.washington.edu