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 11-23-2010, 02:16 AM
New Member
 
Posts: 4
Default [SOLVED] Restoring ldap.bak

I'm having some trouble with my latest snapshot VM of my Zimbra server. Everything appears to be working except I can not authenticate in the admin console or as a user web or IMAP.

I have an older snapshot which I have upgraded to the same version - 6.0.9 and it allows me to auth fine. I have taken a backup of the ldap db.

I tried following the instructions here:

Exporting and Importing Zimbra LDAP Data » Zimbra :: Blog

but on the final import command I get the following errors for every entry:

slapadd: could not add entry dn="uid=info,ou=people,dc=domain,dc=co,dc=nz" (line=1961): id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30995)

I am running the command:

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

Can anyone provide me with the correct instructions for preparing an restoring the LDAP db on version 6.0.9 please?

Any assistance would be greatly appreciated.

Thanks
Andy
Reply With Quote
  #2 (permalink)  
Old 11-23-2010, 09:31 AM
Moderator
 
Posts: 1,554
Default

did you delete the existing ldap database first?
Reply With Quote
  #3 (permalink)  
Old 11-23-2010, 10:23 AM
New Member
 
Posts: 4
Default

I thought I had but I can't be sure, I'm fairly green on the LDAP side of things. What files should I be deleting to be sure?

I tried removing all the files in: /opt/zimbra/openldap/var/openldap-data/ but this does not seam to have worked so I tried putting DB_CONFIG back but still no change I am still getting the same errors.

Are you able to tell me which directory I should be deleting?
Reply With Quote
  #4 (permalink)  
Old 11-23-2010, 12:29 PM
Zimbra Employee
 
Posts: 184
Default

Before importing the ldap data on a 6.0.x, you will need to move the old hdb directories out of the way.

1) ldap stop

2) mv /opt/zimbra/data/ldap/hdb /opt/zimbra/data/ldap/OLD.hdb

3) mkdir /opt/zimbra/data/ldap/hdb

4) mkdir /opt/zimbra/data/ldap/hdb/db

5) mkdir /opt/zimbra/data/ldap/hdb/logs

6) cp /opt/zimbra/data/ldap/OLD.hdb/db/DB_CONFIG /opt/zimbra/data/ldap/hdb/db/DB_CONFIG

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

8) ldap start
Reply With Quote
  #5 (permalink)  
Old 12-02-2010, 11:58 AM
New Member
 
Posts: 4
Default

Thanks for everybodies help. It turns out the issue I was having was the result of an IPv6 line being added to the hosts file after a Fedora update. Looks like this was preventing Zimbra from starting and all I in fact needed to do was remove this line.

Always easy when you know how
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.