readthefuckingmanual.net

[SOLVED] bdb_db_open: Database cannot be opened, err 22. Restore from backup!

Error added: 2008-04-21T10:31:35Z

1 people waiting for the answer...

5 answers found.

Answer 569 (100.0% helpful)

/etc/init.d/slapd stop
slapadd -l your-recent-backup.ldif
Permalink

Answer 1287 (66.666664% helpful)

put this command 
/usr/sbin/slapd_db_recover -v -h /var/lib/ldap
Permalink

Answer 1153 (60.0% helpful)

I commented out loglevel in slapd.conf. This fixes the err 22 and lets you run slapadd which will fix the id2entry.bdb error you will get until you slapadd something into the ldap database. Apparently the dbd freaks if it can\'t log. You can also leave the loglevel uncommented and put local4.*   /var/log/slapd.log into /etc/syslog.conf and this will fix err 22 as well. Worked for me, good luck.
Permalink

Answer 1288 (33.333332% helpful)

put this command 
/usr/sbin/slapd_db_recover -v -h /var/lib/ldap
Permalink

Answer 987 (0.0% helpful)

What if you don\'t have a backup to restore? As in this is a fresh install of ldap and it gives this error?
Permalink

Add an answer/solution

If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people struggling with this too.


Please enter 61948 here

If you want to be notified via email when this is solved, enter your email address here: