Results 1 to 10 of 10

Thread: slapd fail - (restore backup)

  1. #1
    seewhy is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default slapd fail - (restore backup)

    I am trying a restore backup exercise. I want to be prepared in case the production server go down, I can just use the backup to restore the zimbra on another machine right away. However, I do not have an extra machines to be this backup server and I can only setup up a virtual machine on a Xen server. Both the production OS and the backup are running CentOS 5.4. The only different is the the backup OS resides over Xen. The zimbra version is open source version 6.04 and the backup was done using the "[Yet Another Backup Script Community Version]" script.
    As soon as I restore the backup on the virtual machine and try to start zimbra, I get the following:

    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

    in the log I see

    Feb 5 16:03:02 mailserv slapd[18055]: @(#) $OpenLDAP: slapd 2.4.20 (Dec 4 2009 09:09:47) $ build@build11.lab.zimbra.com:/home/build/p4/GNR-604/ThirdParty/openldap/openldap-2.4.20.4z/servers/slapd
    Feb 5 16:03:03 mailserv slapd[18055]: bdb(): file id2entry.bdb has LSN 1/8697712, past end of log at 1/8086791
    Feb 5 16:03:03 mailserv slapd[18055]: bdb(): Commonly caused by moving a database from one database environment
    Feb 5 16:03:03 mailserv slapd[18055]: bdb(): to another without clearing the database LSNs, or by removing all of
    Feb 5 16:03:03 mailserv slapd[18055]: bdb(): the log files from a database environment
    Feb 5 16:03:03 mailserv slapd[18055]: bdb(): /opt/zimbra/data/ldap/hdb/db/id2entry.bdb: unexpected file type or format
    Feb 5 16:03:03 mailserv slapd[18055]: hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22).
    Feb 5 16:03:03 mailserv slapd[18055]: backend_startup_one (type=hdb, suffix=""): bi_db_open failed! (22)
    Feb 5 16:03:03 mailserv slapd[18055]: bdb_db_close: database "": alock_close failed
    Feb 5 16:03:03 mailserv slapd[18055]: slapd stopped.


    I checked the [SOLVED] LDAP / slapd - Database environment corrupt (Issue & Solution) link but still not able to go it to work. But I notice there mentioned some flag -b have to be done if virtual machine is involved. Would someone be able to enlighten me on that?

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    It may be worth running as root
    Code:
    /opt/zimbra/libexec/zmfixperms --extended

  3. #3
    j2b's Avatar
    j2b
    j2b is offline Special Member
    Join Date
    Sep 2008
    Location
    Latvia
    Posts
    165
    Rep Power
    6

    Default

    Could it be just as it? Recently encountered the same problem after incorrect server shutdown (hang). The only solution worked for me, was to recover whole zimbra folder with data. Fortunately it was not active server - only LDAP, where registrations didn't take place during last period without backup. Can you seewhy confirm, that this solves your problem?

  4. #4
    seewhy is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default

    Thank you very much for your reply uxbod but it didn't work. From the log, it seems that id2entry.bdb is not in correct format for some reason. Would the LSN have something to do with it? Do I need to reset that some how?

  5. #5
    seewhy is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default

    Okay, I think I got it. I restored from the backup one more time. This time, instead of doing "zmcontrol start" right away, I do:
    $ cd /opt/zimbra/data/ldap/hdb/db
    $ /opt/zimbra/bdb-4.7.25.4/bin/db_recover -v

    then

    $ su - zimbra
    # zmcontrol start

    and YES! It is running. Let me try to restore another backup from the production server that will be generated tonite and see if I can repeat this and I will let you guys know the result.

  6. #6
    frogstarr78 is offline Junior Member
    Join Date
    Oct 2006
    Posts
    7
    Rep Power
    8

    Default db_recover doesn't help

    I've got a similar issue, but running db_recover doesn't seem to resolve it. Any other suggestions?

  7. #7
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,569
    Rep Power
    57

    Default

    How about starting by updating your forum profile with the output of the following command (do not post the output in this thread):

    Code:
    zmcontrol -v
    Quote Originally Posted by frogstarr78 View Post
    I've got a similar issue, but running db_recover doesn't seem to resolve it. Any other suggestions?
    You should also give a description of what exactly happened and some detail of the errors you see in the log files.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  8. #8
    MACscr is offline Special Member
    Join Date
    Jun 2010
    Posts
    126
    Rep Power
    5

    Default

    Im getting the same error after upgrading from ubuntu 8.04 to 10.04 and Zimbra 6.0.8 to 6.0.10:

    Code:
    	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
    Ive already ran fixperms and db_recover shows:

    Code:
    zimbra@wheelie:~/data/ldap/hdb/db$ /opt/zimbra/bdb-4.7.25.4/bin/db_recover -v
    Finding last valid log LSN: file: 2 offset 4651260
    Recovery starting from [2][4651112]
    Recovery complete at Fri Dec 24 08:35:24 2010
    Maximum transaction ID 800003aa Recovery checkpoint [2][4651260]

  9. #9
    MACscr is offline Special Member
    Join Date
    Jun 2010
    Posts
    126
    Rep Power
    5

    Default

    GRRRR, i just restored the virtual machine from backup and its getting the same errors.

  10. #10
    seewhy is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default

    Firstly, just want to let you guys know I re-tried a few times doing what I did and the new ZCS come on back every time. The ZCS I am running is still the good old open source 6.0.4 on CENTOS 5.4 over XENServer 5.5 and now with 5.6

    MACscr, just curious. Have you tried restoring the machine of the same version of ZCS.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Regarding Network Edition Backup and Restore
    By bhwong in forum Administrators
    Replies: 7
    Last Post: 12-03-2009, 08:07 AM
  2. [SOLVED] Backup and Restore with Snapshots
    By mohammedking in forum Administrators
    Replies: 2
    Last Post: 09-26-2009, 04:12 PM
  3. zimbra opesource Backup Script Problem!
    By tashi in forum Administrators
    Replies: 4
    Last Post: 03-30-2009, 11:49 PM
  4. Restore specific network edition backup
    By sdemeyer in forum Administrators
    Replies: 5
    Last Post: 09-07-2008, 09:04 PM
  5. Restore single account failed from full backup
    By fmodola in forum Administrators
    Replies: 4
    Last Post: 06-20-2007, 05:27 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
  •