Results 1 to 8 of 8

Thread: Migrate Zimbra to Zimbra

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Winnipeg, Manitoba, Canada
    Posts
    127
    Rep Power
    8

    Default Migrate Zimbra to Zimbra

    Hi,

    A couple of years back, I did a 'faulty' Zimbra install. I made a typo in the systems hostname (transposed 2 letters). To make a long story short, I did a bunch of ldap and file changes to get a working system.

    After a couple of years, I realize that not everything is working at 100%. So, what I'd like to do is migrate to a new Zimbra install. New host name, new IP address, same domain.

    I initially tried to do a system move (described in the Wiki: Moving from a 32 bit to 64 bit system).

    I could not get it working. ldap and cert issues, I think. I've been working on it for ~ 9 hours now. I give up.

    What I want to do now, is migrate all the users and data from the old install to the new. No one uses anything except email and calendar with Outlook Connector.

    The client I'm doing this for has an up-to-date Network License.

    How can I do what I need to do?

    Thanks,
    Gerald


    So this is

  2. #2
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    I don't know how messed up the entire environment is, but if you want to start with a fresh install on a new system, you can do that and create all of the user accounts and aliases, and do an entire mailbox export/import for each user (ZCS-to-ZCS Migrations » Zimbra :: Blog)

    Export with:
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL “//?fmt=tgz” > /tmp/account.tgz

    Next transfer via rsync, scp, sftp, etc. to copy the account.tgz file to the new server, and then import with:

    /opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz&resolve=reset” /tmp/account.tgz

    That won't copy preferences or passwords, but will get a fresh install and copy all user data over. It may seem like a bit of work, but will be a very clean migration.

  3. #3
    Join Date
    May 2007
    Location
    Winnipeg, Manitoba, Canada
    Posts
    127
    Rep Power
    8

    Default

    Since all users use Outlook Connector, I'm not sure what preferences will be setup. Will this copy get Mail Filters?

    What would happen if I start from scratch, re-create all users, aliases, and distribution lists, and copy of the /opt/zimbra/store and /opt/zimbra/index directories?

    It should take less time than the 10 hours I spent on it yesterday.

    Thanks,
    Gerald

  4. #4
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    It will not get the Mail Filters, but that is easy to copy over.

    You can do this more elegantly in mass for all accounts in a script, but heres a basic walk through

    orig server:
    zmmailbox -z -m user@domain.com gfrl > /tmp/filters.txt

    copy /tmp/filters.txt to the new server

    new server:
    cat /tmp/filters.txt | sed 's/^/afrl /' | zmmailbox -z -m user@domain.com


    The GetRestURL and PostRestURL will get Messages, Contacts, Calendars, Tasks, and Documents. Basically everything that is not within the "Preferences" tab.

    Copying the store and index directories will not work because it doesn't copy all of the data within MySQL - plus you may run into some 32/64-bit issues if you're changing platform bit length (which I believe you are, since that is the document you followed from the beginning).

  5. #5
    Join Date
    May 2007
    Location
    Winnipeg, Manitoba, Canada
    Posts
    127
    Rep Power
    8

    Default

    Sorry to reply again, bad form...

    Will this get the users calendar as well?

  6. #6
    Join Date
    May 2007
    Location
    Winnipeg, Manitoba, Canada
    Posts
    127
    Rep Power
    8

    Default

    Okay, so let's see if I have this right:

    On the old server:
    # /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL “//?fmt=tgz” > /tmp/zimbra/user.tgz
    # zmmailbox -z -m user@domain.com gfrl > /tmp/zimbra/user_filters.txt

    for all users on the system (about 40, easily scriptable)

    copy the roughly 80 files from the old server to the new.

    On the new server:
    # /opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz&resolve=reset” /tmp/zimbra/user.tgz
    # cat /tmp/zimbra/user_filters.txt | sed 's/^/afrl /' | zmmailbox -z -m user@domain.com

    The end result, once all users point their Outlook Connectors to the new mail server, is a duplicate install. The users won't notice a difference at all.

    Gerald

  7. #7
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    With the exception of preferences including signatures stored on the server side - i think outlook stores them locally however.

    You will have to make sure passwords get copeied over accordingly. Search forums for extracting current values and updating them via LDAP. There have been posts in the past about it.

  8. #8
    Join Date
    May 2007
    Location
    Winnipeg, Manitoba, Canada
    Posts
    127
    Rep Power
    8

    Default

    Zimbra authenticates against Active Directory, so I think that is taken care of. Signatures, I believe, are handled by Outlook. I can verify.

    Thanks for you help. I'll be trying this next weekend.

    Gerald

Similar Threads

  1. Replies: 15
    Last Post: 11-24-2009, 08:46 AM
  2. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 05:42 PM
  3. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  4. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM
  5. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •