Results 1 to 5 of 5

Thread: [SOLVED] Restoring ldap.bak

  1. #1
    Orangeruffy is offline New Member
    Join Date
    Aug 2010
    Posts
    4
    Rep Power
    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

  2. #2
    bdial's Avatar
    bdial is offline Moderator
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    10

    Default

    did you delete the existing ldap database first?

  3. #3
    Orangeruffy is offline New Member
    Join Date
    Aug 2010
    Posts
    4
    Rep Power
    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?

  4. #4
    king0770's Avatar
    king0770 is offline Zimbra Employee
    Join Date
    Sep 2007
    Posts
    186
    Rep Power
    7

    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

  5. #5
    Orangeruffy is offline New Member
    Join Date
    Aug 2010
    Posts
    4
    Rep Power
    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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Restoring mails, folders and calendars
    By iain in forum Administrators
    Replies: 3
    Last Post: 03-17-2008, 10:14 AM
  2. Restoring to version 5
    By russgalleywood in forum Installation
    Replies: 4
    Last Post: 02-12-2008, 09:35 AM
  3. Restoring old mailboxes?
    By RobLarose in forum Installation
    Replies: 6
    Last Post: 09-25-2007, 12:55 PM
  4. Moved: Help restoring data
    By toricred in forum Administrators
    Replies: 0
    Last Post: 08-06-2007, 05:37 PM
  5. Problem when restoring from incremental backup
    By Eyfi in forum Administrators
    Replies: 4
    Last Post: 06-28-2007, 08:47 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
  •