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

Re: migrating data from ldbm to bdb

Buchan Milne wrote:

On Tuesday 14 February 2006 18:46, Necati Demir wrote:

Buchan Milne wrote:

On Tuesday 14 February 2006 17:05, Necati Demir wrote:

On Tuesday 14 February 2006 12:09, Necati Demir wrote:

i used these;

slapcat -l data.ldif

and then in the config file, i changed the
database ldbm
line to
database bdb.

Then, i restarted ldap, and did
slapadd -l data.ldif

slapd should not be running when you use slapadd.

but id doesnt do something.
It only waits.

You should actually do this:

1)Stop slapd
2)slapcat -l data.ldif
3)Edit slapd.conf, change ldbm to bdb, add a checkpoint directive (see
4)Move the existing database files
5)Add a DB_CONFIG file (see the FAQ-o-matic for some info here)
6)slapadd -l data.ldif

But it gives a message like this

[root@alibaba root]# slapadd -l data.ldif
slap_startup failed

When slapd is not running? Does your slapd have support for bdb?

Yes, i have bdb support, i compiled it with bdb support.

Did you try increasing the verbosity (ie slapadd -d -1 -l data.ldif)?

[root@alibaba root]# slapadd -d 2 -l data.ldif
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
bdb_db_init: Initializing BDB database
bdb(dc=ktu.edu.tr): PANIC: fatal region error detected; run recovery
bdb_db_open: dbenv_open failed: DB_RUNRECOVERY: Fatal error, run
database recovery (-30978)
backend_startup: bi_db_open failed! (-30978)
slap_startup failed

You skipped step 4. Remove *all* the database related files from /var/lib/ldap

Yes that is right, i have done rm -f *dbb, i have not removed log files and the others.
Now everything is ok. It works and using bdb..

(except DB_CONFIG, if present), including the database environment files (__db*), the transaction log files (log.*) and any database files (*.bdb). Why these are present, if you had only used ldbm before, is another question (ie, there's something you haven't told us).


Necati Demir

necati at labristeknoloji.com
Labris Teknoloji
Yazilim Gelistirme Uzmani

ndemir at demir.web.tr