[Date Prev][Date Next]
Re: moving ldap-db via file-copying?
Silvana <firstname.lastname@example.org> writes:
> I hope you can help me, migrate my old ldap-db, problem is this:
> Our old server was running with ldap2.2.7? to serve as backend to the
> sambaserver and as of today its refusing to work or give errors
> (the ldap-daemon seems to start, but doesn't open the port, is not
> accessible, gives no errors and has to be killed, because stopping it
> gives no reaction)
> now, i've set up a new machine, to use ldap, given it the same suffix, cn,
> etc. the version of ldap is a newer one, than on the old box, although
> i'm not sure, how far they are removed.
> is it in some way possible, to just copy the files in /var/lib/ldap/ from
> the old server and insert them into the new box in the same folder? if so,
> which files would be ok to overwrite, which not? or woul i have to tweak
> some other files for that as well?
> or is this completely inconceivable (as i dread is the case), and if yes,
> how am i to get the files from the old server to the new one?
> any help on this would be greatly appreciated
It is quite likely that your database got corrupted somewhow, so
depending on the database definition you may try to recover the data
first. If you had defined 'database bdb' in slapd.conf you may try to
recover the database with the BerkeleyDB tool db_recover, if you had
defined database ldbm, you lost.
To add a database to a new OpenLDAp instance the proper way is to dump
the old data to a file, using the tool slapcat(8) and slapadd(8) to
the new instance. As you presumably have built OpenLDAP with a newer
version of BerkeleyDB, just copying files is not appropriate.
Dieter KlÃnter | Systemberatung
GPG Key ID:8EF7B6C6