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

Re: How to detect a corrupt database?



Jordi Espasa Clofent wrote:
Hi folks,

I've experienced some problems in one of my 3 OpenLDAP servers. First
glance suggests a ppolicy overlay problem, but, at the end, the problem
was resolved, simply, deleting the bbdd (BDB4) and restarting the system
(is a consumer server, so the ddbb was automatically regenerated).

If your disks are working and haven't run out of space, database corruption pretty much never happens. You probably should describe the situation that leads you to believe there was a corruption. You should also list the versions of software in use.

So, my questions are

* ¿How I can detect a corrupt database?

slapd will detect unclean shutdowns automatically, and automatically recover from them.

* ¿Is there any tool/command to check the ddbb health (DBD4)?

slaptest will tell you if there was an unclean shutdown.

* ¿What can I do if the corrupted database is the provider database?

Restore from a backup.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/