| 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.
|  | 
04-24-2010, 05:25 PM
| | Special Member | |
Posts: 108
| | 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 | 
04-24-2010, 09:14 PM
| | Outstanding Member | |
Posts: 717
| | 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. | 
04-25-2010, 06:01 AM
| | Special Member | |
Posts: 108
| | 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 | 
04-25-2010, 06:03 AM
| | Special Member | |
Posts: 108
| | Sorry to reply again, bad form...
Will this get the users calendar as well? | 
04-25-2010, 10:26 AM
| | Outstanding Member | |
Posts: 717
| | 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). | 
04-25-2010, 07:28 PM
| | Special Member | |
Posts: 108
| | 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 | 
04-25-2010, 07:35 PM
| | Outstanding Member | |
Posts: 717
| | 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. | 
04-25-2010, 07:54 PM
| | Special Member | |
Posts: 108
| | 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 | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |