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

Re: Trying to restore ldap database

Thanks for the advice.

The server is restored.  :)

The solution was:

I loaded RH8 with original servers on a spare machine.

Copied configuration from /etc/openldap, schemas from
/etc/openldap/schema and the data from /var/lib/ldap from my backup CDs
to the new machine.

Checked the perms of /var/lib/ldap and contents.

Started the server, checked the server with ldap search and then stopped it.

slapcat -l /tmp/somefilename.ldif

Moved the ldif file to /tmp on the new machine.

As root:

slapadd -c -l /tmp/somefilename.ldif

Changed the ownership of all the files in /var/lib/ldap to ldap.ldap.

Started the server.

Checked with ldapsearch.



Buchan Milne wrote:

Campbell McKilligan wrote:

I have an image on CDs of all the partitions from a RedHat 8.0 Server
which crashed - includes /etc/openldap /var/lib/ldap and so on.

Unfortunately it doesn't include a very recent ldif dump.

The ldap running on the server was:

openldap... 2.0.25-1

The new server is Fedora Core 1 running:

openldap... 2.1.22-8

The ldap service is up and running fine.

Is there a way to populate/migrate the new server with the records from
the old server?  I can install the previous version of openldap if there
is more hope of doing it that way.

A quick glance at the /var/lib/ldap directory shows me that the old
server had .gdbm files and the new one seems to be creating .dbb files.

2.1.22-8 should contain: /usr/sbin/slapcat-slapd-2.0-gdbm

Which, if you place the configs and the data files back where they were,
may be able to give you an ldif dump, which you should import with slapadd.