Results 1 to 5 of 5

Thread: Restore from backup failed - missing accounts

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Rep Power

    Default Restore from backup failed - missing accounts

    First of all, I'm using zcs 4.5.6 community edition on Debian 4.0. I would like at some point to upgrade to 4.5.11 or 5.0x, but I am dealing with a more immediate problem at the moment.

    Following a restoration from a full backup of /opt/zimbra, I am having a problem where accounts which appear in this output:

    $ mysql zimbra -e 'select id,comment from mailbox'

    Do not appear in "zmprov" followed by "gaa" - only about half of my accounts are present here, and these accounts and several entire domains no longer appear in the admin Web interface. Likewise, messages to these accounts bounce off the server.
    zimbra@server:~$ zmprov gmi
    ERROR: account.NO_SUCH_ACCOUNT (no such account:
    zimbra@server:~$ mysql zimbra -e 'select id,account_id,comment,item_id_checkpoint from mailbox where mailbox.comment like "%test%"'
    | id | account_id | comment | item_id_checkpoint |
    | 89 | 5c5ee060-d428-4924-b579-79d94311fe51 | | 1339 |
    How can I restore this Zimbra account info to match up to the mailboxes which are still holding data for the accounts? I would be happy with any solution at all at this point, since I am potentially dealing with a good deal of bouncing email right now. Thanks in advance!

    (Plan B is to recreate all the accounts/domains that show up in the mailbox DB but don't show in the Zimbra interface, and hope to migrate their old data to the new mailboxes.)

    Edit: This thread also describes my problem, but there is no solution given. Just an FYI.
    Last edited by csky_max; 05-28-2008 at 10:30 AM. Reason: added output of zmprov gmi and mysql

  2. #2
    Join Date
    Oct 2007
    Rep Power


    Recreating one of the missing domains failed with this message: The specified domain already exists.

    But the domain does not show up in the "Domains" list in the admin interface.

  3. #3
    Join Date
    Oct 2007
    Rep Power


    Another update, attempts to recreate the accounts in LDAP yield an error - "account already exists".

    So it seems as if we may be stuck recreating all the missing LDAP info by hand? I have also tried restoring from an earlier backup (less than a week old) with similar results - not all data present.

    Here is an example of trying to create a domain which already exists, but which does not show up in the list from "zmprov gad", nor in the admin interface:
    zimbra@server:~/openldap-data$ zmprov cd
    ERROR: account.DOMAIN_EXISTS (domain already exists:
    zimbra@server:~/openldap-data$ zmprov gd
    # name
    dc: example
    description: Example
    o: domain
    objectClass: dcObject
    objectClass: organization
    objectClass: zimbraDomain
    zimbraAuthMech: zimbra
    zimbraDomainType: local
    zimbraGalAutoCompleteLdapFilter: externalLdapAutoComplete
    zimbraGalInternalSearchBase: DOMAIN
    zimbraGalLdapAttrMap: co=workCountry
    zimbraGalLdapAttrMap: company=company
    zimbraGalLdapAttrMap: description=notes
    zimbraGalLdapAttrMap: displayName,cn=fullName
    zimbraGalLdapAttrMap: givenName,gn=firstName
    zimbraGalLdapAttrMap: initials=initials
    zimbraGalLdapAttrMap: l=workCity
    zimbraGalLdapAttrMap: objectClass=objectClass
    zimbraGalLdapAttrMap: ou=department
    zimbraGalLdapAttrMap: physicalDeliveryOfficeName=office
    zimbraGalLdapAttrMap: postalCode=workPostalCode
    zimbraGalLdapAttrMap: sn=lastName
    zimbraGalLdapAttrMap: st=workState
    zimbraGalLdapAttrMap: street,streetAddress=workStreet
    zimbraGalLdapAttrMap: telephoneNumber=workPhone
    zimbraGalLdapAttrMap: title=jobTitle
    zimbraGalLdapAttrMap: whenChanged,modifyTimeStamp=modifyTimeStamp
    zimbraGalLdapAttrMap: whenCreated,createTimeStamp=createTimeStamp
    zimbraGalLdapAttrMap: zimbraCalResLocationDisplayName=zimbraCalResLocati onDisplayName
    zimbraGalLdapAttrMap: zimbraCalResType=zimbraCalResType
    zimbraGalLdapAttrMap: zimbraId=zimbraId
    zimbraGalLdapAttrMap: zimbraMailDeliveryAddress,zimbraMailAlias,mail=ema il,email2,email3,email4,email5,email6
    zimbraGalLdapAttrMap: zimbraMailForwardingAddress=zimbraMailForwardingAd dress
    zimbraGalMaxResults: 100
    zimbraGalMode: zimbra
    zimbraId: 8cc46ca9-197a-461a-bd77-3542c5c4ceb3
    zimbraMailStatus: enabled
    Here is the output of various LDAP info commands, which I have seen requested in other threads:

    zimbra@server:~/openldap-data$ /opt/zimbra/sleepycat/bin/db_stat -c
    217 Last allocated locker ID.
    2147M Current maximum unused locker ID.
    9 Number of lock modes.
    1000 Maximum number of locks possible.
    1000 Maximum number of lockers possible.
    1000 Maximum number of lock objects possible.
    18 Number of current locks.
    31 Maximum number of locks at any one time.
    55 Number of current lockers.
    61 Maximum number of lockers at any one time.
    16 Number of current lock objects.
    25 Maximum number of lock objects at any one time.
    137128 Total number of locks requested.
    137110 Total number of locks released.
    0 Total number of lock requests failing because DB_LOCK_NOWAIT was set.
    0 Total number of locks not immediately available due to conflicts.
    0 Number of deadlocks.
    0 Lock timeout value.
    0 Number of locks that have timed out.
    0 Transaction timeout value.
    0 Number of transactions that have timed out.
    440KB The size of the lock region..
    0 The number of region locks granted after waiting.
    220092 The number of region locks granted without waiting.
    zimbra@server:~$ ls -l openldap-data
    total 23076
    -r--r----- 1 zimbra zimbra 320 Sep 18 2007 DB_CONFIG
    -rw------- 1 zimbra zimbra 16384 May 28 00:18 __db.001
    -rw------- 1 zimbra zimbra 65544192 May 28 00:18 __db.002
    -rw------- 1 zimbra zimbra 2359296 May 28 00:18 __db.003
    -rw------- 1 zimbra zimbra 450560 May 28 00:18 __db.004
    -rw------- 1 zimbra zimbra 24576 May 28 00:18 __db.005
    -rw-r--r-- 1 zimbra zimbra 4096 May 28 09:24 alock
    -rw------- 1 zimbra zimbra 73728 May 28 08:45 cn.bdb
    -rw------- 1 zimbra zimbra 61440 May 28 08:45 displayName.bdb
    -rw------- 1 zimbra zimbra 94208 May 28 08:00 dn2id.bdb
    -rw------- 1 zimbra zimbra 16384 May 28 09:29 entryCSN.bdb
    -rw------- 1 zimbra zimbra 16384 May 27 23:48 entryUUID.bdb
    -rw------- 1 zimbra zimbra 28672 May 28 08:45 givenName.bdb
    -rw------- 1 zimbra zimbra 540672 May 28 09:29 id2entry.bdb
    -rw------- 1 zimbra zimbra 10484685 May 28 00:14 log.0000000001
    -rw------- 1 zimbra zimbra 9433925 May 28 09:29 log.0000000002
    -rw------- 1 zimbra zimbra 131072 May 28 08:10 mail.bdb
    -rw------- 1 zimbra zimbra 40960 May 28 08:10 objectClass.bdb
    -rw------- 1 zimbra zimbra 40960 May 28 08:45 sn.bdb
    -rw------- 1 zimbra zimbra 20480 May 28 08:15 uid.bdb
    -rw------- 1 zimbra zimbra 8192 May 28 08:10 zimbraDomainName.bdb
    -rw------- 1 zimbra zimbra 16384 May 28 08:10 zimbraId.bdb
    -rw------- 1 zimbra zimbra 69632 May 28 08:10 zimbraMailAlias.bdb
    -rw------- 1 zimbra zimbra 8192 May 28 08:10 zimbraMailCatchAllAddress.bdb
    -rw------- 1 zimbra zimbra 90112 May 28 08:10 zimbraMailDeliveryAddress.bdb
    -rw------- 1 zimbra zimbra 8192 May 28 01:58 zimbraMailForwardingAddress.bdb
    -rw------- 1 zimbra zimbra 8192 May 28 06:57 zimbraVirtualHostname.bdb
    Last edited by csky_max; 05-28-2008 at 10:26 AM. Reason: Added output of zmprov

  4. #4
    Join Date
    Oct 2007
    Rep Power


    Here is another interesting behavior - I attempted to remove a domain whose details show in "zmprov gd" but not in the admin UI, and get this error:

    zimbra@server:~$ zmprov dd
    ERROR: account.DOMAIN_NOT_EMPTY (domain not empty:
    zimbra@server:~$ zmprov gaa
    The second command "gaa" produced no output, which doesn't seem to match the message from the first "dd" command.

  5. #5
    Join Date
    Oct 2007
    Rep Power


    We did not find a way to solve the problems with LDAP corruption, however the following thread has provided a solution to properly take all the messages for an account and inject it into an account on a rebuilt ZCS 5.0 installation.

    I'm unsure whether to mark this Solved since the LDAP issue is still a mystery, but for what it's worth zmlmtpinject looks like a good general solution for migrating mail between boxes - it doesn't depend on state of MySQL or LDAP in case those have been corrupted. Hope this helps someone else in the future.

Similar Threads

  1. Replies: 658
    Last Post: 04-04-2014, 09:01 AM
  2. Problem with Mail Server - Need help!
    By joeleo in forum Installation
    Replies: 2
    Last Post: 03-04-2008, 11:03 AM
  3. My Zimbra server down ... please help :)
    By frankb in forum Administrators
    Replies: 2
    Last Post: 12-12-2007, 10:29 AM
  4. Restore single account failed from full backup
    By fmodola in forum Administrators
    Replies: 4
    Last Post: 06-20-2007, 05:27 AM
  5. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 10:13 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