Results 1 to 4 of 4

Thread: disaster recovery help: lost ldap db to fs corruption

  1. #1
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default disaster recovery help: lost ldap db to fs corruption

    I went to reboot my server today, and all hell broke loose. A kernel panic during shutdown, and a power cycle later, I find myself with serious filesystem corruption.

    I appear to have lost the LDAP database for zimbra, among other things. I do not have a recent backup. I really only care about recovering emails in the store (which appears to be mostly intact).

    How can I go about dissecting the message store? Is there any way to reasonably get my mail back????

  2. #2
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    Specifically, when trying to start zimbra, I get ...

    sudo /etc/init.d/zimbra start
    Host z.wryfi.net
    Starting ldap...Done.
    Failed.
    Failed to start slapd. Attempting debug start to determine error.
    hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22).
    backend_startup_one (type=hdb, suffix=""): bi_db_open failed! (22)
    bdb_db_close: database "": alock_close failed

  3. #3
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    I have now run db_recover and I still get the same error with id2entry.bdb.

    I am now trying to follow instructions from http://www.zimbra.com/forums/adminis...-solution.html.

    I do not, however, seem to have a /opt/zimvbra/conf/slapd.conf file. There is some kind of default file in /opt/zimbra/openldap-2.4.23.2z/etc/openldap/slapd.conf, but when I try ~/openldap/sbin/slapadd -w -q -f ~/openldap-2.4.23.2z/etc/openldap/slapd.conf -l ../ldap.bak, I get:

    Unrecognized database type (bdb)
    /opt/zimbra/openldap-2.4.23.2z/etc/openldap/slapd.conf: line 53: <database> failed init (bdb)
    slapadd: bad configuration file!

    I suspect the missing ~/conf/slapd.conf is a problem. How can I recreate this file?

  4. #4
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    Ok, so of course openldap-2.4.23 uses cn=config, duh ... running this command worked:

    /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /tmp/ldap.bak

    Now my ldap is back up and running. It remains to be seen what messages might have been lost. No more delaying on that backup plan!

Similar Threads

  1. Replies: 23
    Last Post: 01-24-2013, 02:44 PM
  2. LDAP Cannot bind on migration to new server
    By neekster in forum Migration
    Replies: 23
    Last Post: 03-09-2009, 02:08 AM
  3. Replies: 2
    Last Post: 02-12-2008, 10:55 AM
  4. [SOLVED] ldap errors on zimbra start
    By jimbo in forum Administrators
    Replies: 1
    Last Post: 01-14-2008, 08:51 AM
  5. 3 testing: LDAP: 389 Failed when restore zimbra
    By victorLeong in forum Administrators
    Replies: 15
    Last Post: 05-24-2007, 06:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •