Zimbra to Zimbra Migrator
This is a tool for migrating data from one Zimbra instance to another. It can migrate data as well as settings, using imapsync for mail, REST import/export for contacts/calendard/briefcase data, and various SOAP calls for other provisioning items (signatures, settings, etc.). When running imapsync, it specifies only mail folders. By not using import/export functionality for mail, it avoids size limit issues induced by the Zimbra proxy.
It is designed so it can be run repeatedly. It will not create duplicate data.
It can be configured to migrate to an alternate or temporary domain.
It requires an administrator account with adminLoginAs permissions for the domain.
It's currently very immature. It supports the following items, and they should be ran in this order:
- imapsync
- contacts
- calendar
- tasks
- briefcase
- signatures
- account attributes
- distribution lists
- aliases
- shares
This order is reflected in the --help output.
IMPORTANT: Contact migration is implemented DESTRUCTIVELY. Contacts are currently migrated via the export/import REST API, and the "resolve" options that let you choose to skip or replace duplicates do not function for contacts. This results in duplicates. To avoid duplicates, this tool will empty the contact folders on the destination account. If the destination account is already in use, and new contacts were added, those new contacts WILL BE LOST. Ideally, this tool's contact support will be rewritten to use SOAP requests to handle contacts directly, but this is a lower priority at present.
NOTE: If you get your account list via --get_all_accounts, all global admins will be hidden from domain admins.
If you run signatures prior to moving contact and briefcase data, you could potentially lose image links and contact attachments in your signatures.
If you run shares before either imapsync/contact/calendar/briefcase data, folders that need sharing permissions may not exist yet on the destination server.
An ideal full migration process would be:
- Create temporary domain on destination server (ie temp.domain.com)
- Get a full account list
- Provision all accounts
- Get crypts from LDAP (or 'zmprov -l gaa -v domain.com | egrep "^# name |^userPassword"')
- Manually apply crypts (this will be rolled into the tool)
- Use migrator --imapsync --contacts --tasks --briefcase --calendar
- migrator --signatures --attrs --distlists
- migrator --shares --aliases
- Move mx to new server
- Rerun migrator --imapsync --contacts --tasks --briefcase --calendar
- (optional) Rerun extra stuff if needed (attrs, etc.)
- Have a burger, you're done! That's what you do when you're done!
usage: migrator [-h] [-c CONFIG] [-l LIST] [-a ACCOUNT] [-d] [-v] [-n]
[--get_all_accounts] [--ssl_level SSL_LEVEL]
[--temp_dir TEMP_DIR] [--imapsync] [--contacts] [--calendar]
[--tasks] [--briefcase] [--signatures] [--attrs] [--aliases]
[--distlists] [--resources] [--sharing]
Zimbra to Zimbra Migration Helper
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Config file (default: zmigrator.cfg)
-l LIST, --list LIST Account list (defaults to this)
-a ACCOUNT, --account ACCOUNT
Account to work on, or enter 'all' to use all accounts
as working set
-d, --debug Debug mode (SOAP Trace)
-v, --verbose Verbose mode
-n, --no_changes No changes (dry run)
--get_all_accounts Get full source account list (via SOAP, sketchy on
large installs, global admins are hidden from domain
admins)
--ssl_level SSL_LEVEL
ssl/tls level (ssl3/tls1/tls1.1/tls1.2)
--temp_dir TEMP_DIR Directory for temporary files (default is /tmp)
--imapsync Perform imapsyncs
--contacts Migrate contacts (DESTRUCTIVE, see readme)
--calendar Migrate calendar data
--tasks Migrate tasks
--briefcase Migrate briefcase data
--signatures Signatures
--attrs Account Attributes
--distlists Distribution Lists
--resources Calendar Resources
--aliases Aliases (should be the last thing)
--sharing Sharing (should be the last thing)