Migrate Zimbra to Zimbra
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?
So this is
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)
/opt/zimbra/bin/zmmailbox -z -m email@example.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 firstname.lastname@example.org 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.
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.
Sorry to reply again, bad form...
Will this get the users calendar as well?
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
zmmailbox -z -m email@example.com gfrl > /tmp/filters.txt
copy /tmp/filters.txt to the new server
cat /tmp/filters.txt | sed 's/^/afrl /' | zmmailbox -z -m firstname.lastname@example.org
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).
Okay, so let's see if I have this right:
On the old server:
# /opt/zimbra/bin/zmmailbox -z -m email@example.com getRestURL “//?fmt=tgz” > /tmp/zimbra/user.tgz
# zmmailbox -z -m firstname.lastname@example.org 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 email@example.com postRestURL “//?fmt=tgz&resolve=reset” /tmp/zimbra/user.tgz
# cat /tmp/zimbra/user_filters.txt | sed 's/^/afrl /' | zmmailbox -z -m firstname.lastname@example.org
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.
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.
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.