Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-2010, 08:10 AM
Intermediate Member
 
Posts: 19
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?
Reply With Quote
  #2 (permalink)  
Old 12-17-2010, 02:09 PM
Special Member
 
Posts: 126
Default

Yep Exporting and Importing Zimbra LDAP Data » Zimbra :: Blog
Reply With Quote
  #3 (permalink)  
Old 12-20-2010, 01:05 AM
Intermediate Member
 
Posts: 19
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..
Reply With Quote
  #4 (permalink)  
Old 12-20-2010, 03:12 AM
Zimbra Consultant & Moderator
 
Posts: 20,313
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
Reply With Quote
  #5 (permalink)  
Old 12-20-2010, 06:55 AM
Intermediate Member
 
Posts: 19
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.
Reply With Quote
  #6 (permalink)  
Old 12-20-2010, 07:06 AM
Intermediate Member
 
Posts: 19
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.
Reply With Quote
  #7 (permalink)  
Old 12-20-2010, 07:08 AM
Zimbra Consultant & Moderator
 
Posts: 20,313
Default

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


Bill
Reply With Quote
  #8 (permalink)  
Old 12-20-2010, 07:08 AM
Intermediate Member
 
Posts: 19
Default

Yes. Got confused with quick reply buttons, sorry
Reply With Quote
  #9 (permalink)  
Old 01-10-2011, 07:55 AM
Intermediate Member
 
Posts: 19
Default

can anybody help with ideas?
Reply With Quote
  #10 (permalink)  
Old 01-10-2011, 10:31 AM
Special Member
 
Posts: 126
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.