Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Recovery after disk failure

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default Recovery after disk failure

    I had zimbra open source edition 6.0.6 installed on ubuntu 8.04 server. Disk mounted as /opt failed, but i manged to copy the whole directories /opt/zimbra/index and /opt/zimbra/store and dumps of mysql databases.
    I had installation files of that version did uninstallation of zimbra and fresh install to new hard disk, stopped zimbra, replaced /opt/zimbra/index /opt/zimbra/store with backed up data, dropped and imported mysql databases.
    The only thing i got stuck with - ldap. I have backup done with /opt/zimbra/libexec/zmslapcat /backup command.
    I get error when i remove contents of /opt/zimbra/data/ldap and try to import ldap data using slapadd
    Code:
    zimbra@mail:/opt/zimbra$ ~/openldap/sbin/slapadd -l /opt/ldap/ldap.bak
    Unrecognized database type (bdb)
    /opt/zimbra/openldap-2.4.21.7z/etc/openldap/slapd.conf: line 53: <database> failed init (bdb)
    slapadd: bad configuration file!
    Are there other ways to import backed up ldif?

  2. #2
    Join Date
    Apr 2007
    Location
    Los Gatos, CA
    Posts
    138
    Rep Power
    8

  3. #3
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default

    This article doesn't help me, unfortunately. If you have some ideas that can be helpful i will really appreciate them here
    Last edited by pingwin; 12-20-2010 at 01:39 AM.

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by pingwin View Post
    This article doesn't help me, unfortunately.
    How about giving some details of why 'it doesn't help' (that doesn't actually tell us much)?

    Quote Originally Posted by pingwin View Post
    If you have some ideas that can be helpful i will really appreciate them here
    It would be helpful if you posted details of what exactly is happening when you try the import shown in that wiki article. Is the LDAP backup from before the HD failure?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default

    I run command

    ~/openldap/sbin/slapadd -l /opt/ldap/ldap.bak

    and get this error

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

    Article says nothing about troubleshooting the error.
    Ldif file was exported because I couldn't copy all openldap files after failure. It seems for me that it contains all necessary ldap data (configuration, users, etc)
    As i understood slapadd adds data to database without slapd daemon running but using it's config. Zimbra 6.x.x most of the ldap configuration data is outside slapd.conf - it is set in cn=config, where databse engine is hdb - not bdb as set in slapd.conf
    The question is how can i fill that hdb database with my ldap data.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Did you actually install the same version of Zimbra that you'd had on your failed system?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default

    Yes, the same, normally I keep installation files of last update of ZCS. So I installed 6.0.6 which had had before failure.

  8. #8
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default

    Yes. Got confused with quick reply buttons, sorry

  9. #9
    Join Date
    Dec 2009
    Posts
    22
    Rep Power
    5

    Default

    can anybody help with ideas?

  10. #10
    Join Date
    Apr 2007
    Location
    Los Gatos, CA
    Posts
    138
    Rep Power
    8

    Default

    Dump the old ldap data on the old server
    /opt/zimbra/libexec/zmslapcat /tmp/

    Remove the default ldap data on the new server
    rm -rf /opt/zimbra/data/ldap/hdb/*

    Create the db and logs folders
    mkdir -p /opt/zimbra/data/ldap/hdb/db /opt/zimbra/data/ldap/hdb/logs

    Fix the permissions (make zimbra the owner of the ldap data)
    chown -R zimbra\: /opt/zimbra/data/ldap

    Import the old ldap data into your new ldap server
    /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /tmp/ldap.bak

    …AND IF YOU RUN INTO TROUBLE

    Fix the perms again
    chown -R zimbra\: /opt/zimbra/data/ldap

    Really fix the perms
    /opt/zimbra/libexec/zmfixperms --extended

Similar Threads

  1. Replies: 23
    Last Post: 01-24-2013, 02:44 PM
  2. Amavis RAM Disk Setup - OK Now To Reimplement?
    By LMStone in forum Administrators
    Replies: 7
    Last Post: 10-12-2011, 08:26 PM
  3. Daily mail report always reports "No messages found"
    By McPringle in forum Installation
    Replies: 42
    Last Post: 06-13-2011, 08:57 AM
  4. Replies: 7
    Last Post: 02-27-2008, 04:17 PM
  5. system failure: getDirectContext
    By avisser in forum Installation
    Replies: 3
    Last Post: 10-12-2005, 05:32 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
  •