Page 1 of 3 123 LastLast
Results 1 to 10 of 36

Thread: Migrating mailboxes from existing zimbra 7.1.3 to live Zimbra 7.1.4

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    17
    Rep Power
    3

    Default Migrating mailboxes from existing zimbra 7.1.3 to live Zimbra 7.1.4

    Have two Zimbra servers pointing to the same LDAP.
    One is running ZCS 7.1.3_GA_3346.UBUNTU8 FOSS edition, this has 250Gb of opt/zimbra. This was the only server until it crashed, and could not restore withing acceptable time. To keep new emails coming, I installed a new server running ZCS 7.1.4_GA_2555.UBUNTU10_64 FOSS edition while fixing the crashed one. The new one has been running for a few weeks now. Obviously users are complaining and missing their old email.

    The crashed server was successfully restored from backup, it has all the data fine. I assigned a different IP, kept everything else same on both machines (eg hostname, passwords). Each of the servers are accessible via http. However on the old server I cannot get imapproxy to run. zmcontrol status show imapproxy Stopped, and zmnginxctl is not running.

    The challenge is how to migrate old mailbox to new, and make them one.
    I compared /opt/zimbra/store/0 from the two servers and found out that they are not corresponding, so I cannot rsync the two, otherwise i will mix emails belonging to different users. The zimbra admin console migration wizard is failing to connect via imap, possibly because imap is not running, so I cannot use the provisioning tool.

    Please can anyone assist how I should go about merging the two.

  2. #2
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    The "pointing at the same LDAP" makes me wonder...

    Is that the same Zimbra ldap backend (running on one of the two servers?) or do you just mean for the authentication?

    Did the accounts get recreated, or just brought back via the existing LDAP? I would imagine they're not going to be accessible via LDAP on the original server since the new server is going to be considered the owning server for the users, so it would point you their if you tried to connect to the old one.

    If I've misunderstood that, then the rest of this post won't necessarily make sense for your situation. If I did understand that correctly, then this is what I would do:

    Set up an LDAP replica on the other box, let it sync, point the mailboxd on that box at the local LDAP, then disconnect them and promote it to master, so you have two independent Zimbra installations that don't know about each other.

    Then use zmprov modifyAccount on the old box to edit the zimbraMailHost attribute on each of the accounts to point them at the local mailboxd on that box. If all of your mysql data is still intact, all of your old accounts should be there and that will link them back in.

    Then use imapsync to copy the contents of each of the accounts from the old server to the new one.

    Useful documentation:

    Setting up the replica on the new server:
    LDAP - Zimbra :: Wiki

    Promoting it to master:
    Promoting Replica to LDAP Master - Zimbra :: Wiki

    Using imapsync:
    Guide to imapsync - Zimbra :: Wiki

    I will point out that the imapsync docs there are *way* out of date. Some of the command line options there are useful. Most linux distros include it now so you don't need to build it, just use your package manager to install it. imapsync supports an admin authentication now, so you don't need to screw with any of the alternate authentication stuff suggested there, just use an admin account to log in on each side.

    Here's the script I use to restore mail out of local backup restores on the same server:

    Code:
    # Fill these in with your data:
    ADMINUSER=""
    ADMINPASS=""
    SRCSERVER=""
    SRCUSER=""
    DSTSERVER=""
    DSTUSER=""
    
    # we write this to a temp file to prevent it from showing up in a 'ps' listing
    TEMPDIR=`mktemp -d /opt/zimbra/data/tmp/zmimapsync-$USER-XXXXXXXX`
    echo $ADMINPASS > "$TEMPDIR/.password"
    
    # background a thread to wait and delete the tempfile after
    # imapsync has had enough time to read it
    ( sleep 5 && rm -rf $TEMPDIR ) &
    
    /usr/bin/imapsync \
        --host1 $SRCSERVER --port1 993 --ssl1 --authmech1 plain \
            --user1 $SRCUSER --authuser1 $ADMINUSER --passfile1 $TEMPDIR/.password \
            --split1 100 \
        --host2 $DSTSERVER --port2 993 --ssl2 --authmech2 plain \
            --user2 $DSTUSER --authuser2 $ADMINUSER --passfile2 $TEMPDIR/.password \
            --split2 100 \
        --nofoldersizes --nosyncacls --subscribe --syncinternaldates

  3. #3
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    Re-reading your initial post, I think you might already have them separate from each other and unaware of each others' presence. If that's the case, then the imapsync part is probably all you really need to know.

  4. #4
    Join Date
    Apr 2012
    Posts
    17
    Rep Power
    3

    Default

    Is that the same Zimbra ldap backend (running on one of the two servers?) or do you just mean for the authentication?

    I have a multi-server installation with the following components on separate:
    1-Authserver (zimbra-ldap) = This is the ldap backend for both mailboxes
    2-MTA (zimbra-mta)
    3-Mailserver (zimbra-store, Install zimbra-spel, zimbra-apache, zimbra-logger)


    Did the accounts get recreated, or just brought back via the existing LDAP?

    Accounts brought back from LDAP.

    I hope this what your assumption was. However Imap proxy is not running, will the imapsync work?

    I get this error: Starting nginx...nginx: [emerg] SSL_CTX_use_certificate_chain_file("/opt/zimbra/conf/domaincerts/aaa.domain.com.crt") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib) failed.

    I had a subdomain aaa.domain.com for certain users. I think it is causing problems.
    Last edited by muyepaa; 04-08-2012 at 10:50 PM.

  5. #5
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    If your IMAP proxy isn't working it just means you need to connect directly to the imap on that mailbox server instead of to the proxy. Your old box with the mailboxes you're recovering is going to need to be separated anyway in order to recover the data off it.

    So yeah, that is what I assumed then. To do the recovery the way I suggested you'll need to add the zimbra-ldap component to the mailbox server that has the recovered mailboxes on it, and set it up as a replica of your main ldap server. Once it's replicated, promote it (but don't tell any of the other servers except itself), then delete that server from the production cluster (zmprov ds ...), change the zimbraMailHost on every account on the recovery system (zmprov ma ...) to point at itself.

  6. #6
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    As far as why the imapproxy isn't working, it sounds like it doesn't like your SSL certificate (or it might be installed wrong)

  7. #7
    Join Date
    Apr 2012
    Posts
    17
    Rep Power
    3

    Default

    Thanks very much, am taking a go at your suggested solution. I will update you when as I go along

  8. #8
    Join Date
    Jul 2006
    Location
    Verona, Italy
    Posts
    153
    Rep Power
    9

    Default

    Have you tried with ZeXtras Mig tool?
    http://gallery.zimbra.com/type/extra...tions-easy-way
    I have done a migration like this some month ago... You don't need all these complications.


    Sent from my iPhone using Tapatalk
    Federico Bertola
    CTO @ StudioStorti

  9. #9
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    Quote Originally Posted by federico.bertola View Post
    Have you tried with ZeXtras Mig tool?
    ZeXtras Migration Tool - Zimbra to Zimbra migrations, the easy way | Zimbra :: Gallery
    I have done a migration like this some month ago... You don't need all these complications.
    That won't help him here, that assumes he already has a working Zimbra install with the old data (he doesn't - he's recovering from a server failure, and has to get that data accessible first).

  10. #10
    Join Date
    Jul 2006
    Location
    Verona, Italy
    Posts
    153
    Rep Power
    9

    Default

    Quote Originally Posted by muyepaa View Post
    ...The crashed server was successfully restored from backup, it has all the data fine. I assigned a different IP, kept everything else same on both machines (eg hostname, passwords). Each of the servers are accessible via http...
    I understood he can...



    Sent from my iPhone using Tapatalk
    Federico Bertola
    CTO @ StudioStorti

Similar Threads

  1. Old Backup stay in TO_DELETE status and no clearing..
    By bartounet in forum Administrators
    Replies: 0
    Last Post: 10-05-2010, 07:40 AM
  2. admin consol blank after 5.0.3 upgarde
    By maumar in forum Administrators
    Replies: 6
    Last Post: 03-21-2008, 05:16 AM
  3. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 08:56 PM
  4. [SOLVED] Error Installing Zimbra on RHEL 5
    By harris7139 in forum Installation
    Replies: 10
    Last Post: 09-25-2007, 11:39 AM
  5. Replies: 16
    Last Post: 09-07-2006, 06:39 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
  •