Difference between revisions of "Zimbra to Zimbra Migration"

(Created page with "Importing Data between Different Version of ZCS servers using the Zimbra to Zimbra Migration Tool Use the Zimbra to Zimbra migration tool '''zmztozmig '''to import account data ...")
 
Line 36: Line 36:
 
'''        '''
 
'''        '''
  
{| class="prettytable"
+
{| style="background:#cccc99;color:black;width:80%;" border="1" cellpadding="5" cellspacing="0" align="center"
|-
 
|
 
<center>'''Parameter'''</center>
 
  
|
+
! '''Parameter''' !! '''Description''' !! '''Entered as'''
<center>'''Description'''</center>
+
|- style="background:white; color:black"
 
+
! '''SourceZCSServer'''
|
+
| IP address or name of the source server.
<center>'''Entered as '''</center>
+
| '''SourceZCSServer=&lt;<nowiki>source.com</nowiki>&gt''';
 
+
|- style="background:#f0f0f0f0; color:black"
|-
+
! '''SourceAdminUser'''
|
+
| ZCS administrator name for the source server.
'''SourceZCSServer'''
+
| '''SourceAdminUser=&lt;sourceadmin&gt;'''
 
+
|- style="background:white; color:black"
|
+
! '''SourceAdminPwd'''
IP address or name of the source server.
+
| ZCS administrator password for the source server.
 
+
| '''SourceAdminPwd=&lt;adminpswrd&gt;'''
|
+
|- style="background:#f0f0f0f0; color:black"
'''SourceZCSServer=&lt;<nowiki>source.com</nowiki>&gt;'''
+
! '''SourceAdminPort'''
 
+
| Source server admin port - 7071
|-
+
| '''SourceAdminPort=&lt;port&gt;'''
|
+
|- style="background:white; color:black"
'''SourceAdminUser'''
+
! '''TargetZCSServer'''
 
+
| IP address or name of the destination server where the data is imported.
|
+
| '''TargetZCSServer=&lt;<nowiki>destination.com</nowiki>&gt;'''
ZCS administrator name for the source server.
+
|- style="background:#f0f0f0f0; color:black"
 
+
! '''TargetAdminUser'''
|
+
| ZCS administrator name for the destination server.
'''SourceAdminUser=&lt;sourceadmin&gt;'''
+
| '''TargetAdminUser=&lt;targetadmin&gt;'''
 
+
|- style="background:white; color:black"
|-
+
! '''TargetAdminPwd'''
|
+
| ZCS administrator password for the destination server.
'''SourceAdminPwd'''
+
| '''TargetAdminPwd=&lt;adminpswrd&gt;'''
 
+
|- style="background:#f0f0f0f0; color:black"
|
+
! '''TargetAdminPort'''
ZCS administrator password for the source server.
+
| Destination server admin port- 7071.
 
+
| '''TargetAdminPort=&lt;port&gt;'''
|
+
|- style="background:white; color:black"
'''SourceAdminPwd=&lt;adminpswrd&gt;'''
+
! '''Threads'''  
 
+
| Set the number of accounts to be imported simultaneously. The default is 1.
|-
 
|
 
'''SourceAdminPort'''
 
 
 
|
 
Source server admin port - 7071
 
 
 
|
 
'''SourceAdminPort=&lt;port&gt;'''
 
 
 
|-
 
|
 
'''TargetZCSServer'''
 
 
 
|
 
IP address or name of the destination server where the data is imported.
 
 
 
|
 
'''TargetZCSServer=&lt;<nowiki>destination.com</nowiki>&gt;'''
 
 
 
|-
 
|
 
'''TargetAdminUser'''
 
 
 
|
 
ZCS administrator name for the destination server.
 
 
 
|
 
'''TargetAdminUser=&lt;targetadmin&gt;'''
 
 
 
|-
 
|
 
'''TargetAdminPwd'''
 
 
 
|
 
ZCS administrator password for the destination server.
 
 
 
|
 
'''TargetAdminPwd=&lt;adminpswrd&gt;'''
 
 
 
|-
 
|
 
'''TargetAdminPort'''
 
 
 
|
 
Destination server admin port- 7071.
 
 
 
|
 
'''TargetAdminPort=&lt;port&gt;'''
 
 
 
|-
 
|
 
'''Threads '''
 
 
 
|
 
Set the number of accounts to be imported simultaneously. The default is 1.
 
  
 
Set this at a low number of threads. When you start to import the data, review the source/destination ZCS server CPU usage I/O rate and write to disk per second. If the server has power to run more threads, you can edit the <nowiki>zmztozmig.co</nowiki>nf file to increase the threads one at a time.
 
Set this at a low number of threads. When you start to import the data, review the source/destination ZCS server CPU usage I/O rate and write to disk per second. If the server has power to run more threads, you can edit the <nowiki>zmztozmig.co</nowiki>nf file to increase the threads one at a time.
  
|
+
| '''Threads=&lt;n&gt;'''
'''Threads=&lt;n&gt;'''
 
 
 
|-
 
|
 
'''WorkingDirectory'''
 
 
 
|
 
The directory path to where the tar’d account data files are downloaded.
 
 
 
|
 
'''WorkingDirectory=/opt/zimbra/data/zmztozmig/work'''
 
 
 
|-
 
|
 
'''FailedDirectory'''
 
 
 
|
 
The directory path to where tar’d account data files are moved if the account import fails.
 
 
 
|
 
'''FailedDirectory=/opt/zimbra/data/zmztozmig/failed'''
 
 
 
|-
 
|
 
'''''''''KeepSuccessFiles'''
 
  
|
+
|- style="background:#f0f0f0f0; color:black"
'''KeepSuccessFiles''' is set to FALSE. The tar files are deleted after the data is imported.  
+
! '''WorkingDirectory'''
 +
| The directory path to where the tar’d account data files are downloaded.
 +
| '''WorkingDirectory=/opt/zimbra/data/zmztozmig/work'''
 +
|- style="background:white; color:black"
 +
! '''FailedDirectory'''
 +
| The directory path to where tar’d account data files are moved if the account import fails.
 +
| '''FailedDirectory=/opt/zimbra/data/zmztozmig/failed'''
 +
|- style="background:#f0f0f0f0; color:black"
 +
! '''KeepSuccessFiles'''
 +
| '''KeepSuccessFiles''' is set to FALSE. The tar files are deleted after the data is imported.  
  
 
If you want to keep the downloaded tar files after they are imported, set this to TRUE.
 
If you want to keep the downloaded tar files after they are imported, set this to TRUE.
  
|
+
| '''KeepSuccessFiles=FALSE'''
'''KeepSuccessFiles=FALSE'''
+
|- style="background:white; color:black"
 
+
! '''SuccessDirectory'''
|-
+
| If you set '''KeepSuccessFiles''' to TRUE, identify the directory where tar’d account files are moved after successful imported.  
|
+
| '''SuccessDirectory=/opt/zimbra/data/zmztozmig/successes'''
'''SuccessDirectory'''
+
|- style="background:#f0f0f0f0; color:black"
 
+
! '''LogDirectory'''
|
+
| A common log file, ztozlog*.log, is created for the complete import process and separate log file are created for each account data file that is imported.  
If you set '''KeepSuccessFiles''' to TRUE, identify the directory where tar’d account files are moved after successful imported.  
 
 
 
|
 
'''SuccessDirectory=/opt/zimbra/data/zmztozmig/successes'''
 
 
 
|-
 
|
 
'''LogDirectory'''
 
 
 
|
 
A common log file, ztozlog*.log, is created for the complete import process and separate log file are created for each account data file that is imported.  
 
  
 
Configure the directory location where log files are saved.
 
Configure the directory location where log files are saved.
  
|
+
| '''LogDirectory=/opt/zimbra/data/zmztozmig/logs'''
'''LogDirectory=/opt/zimbra/data/zmztozmig/logs'''
+
|- style="background:white; color:black"
 
+
! '''DomainMap'''
|-
+
| If accounts are being migrated from one domain to another domain, specify the source domain and destination domain.  
|
 
'''DomainMap'''
 
 
 
|
 
If accounts are being migrated from one domain to another domain, specify the source domain and destination domain.  
 
  
 
You can create multiple DomainMap entries if the Accounts list contains accounts from different domains.
 
You can create multiple DomainMap entries if the Accounts list contains accounts from different domains.
  
|
+
| '''DomainMap=<nowiki>fromdomain.com</nowiki> <nowiki>todomain.com</nowiki>'''
'''DomainMap=<nowiki>fromdomain.com</nowiki> <nowiki>todomain.com</nowiki>'''
+
|- style="background:#f0f0f0f0; color:black"
 
+
! '''Accounts'''
|-
+
| Specify which account’s data should be imported. This is a comma separated list of accounts.  
|
 
'''Accounts'''
 
 
 
 
 
 
 
|
 
Specify which account’s data should be imported. This is a comma separated list of accounts.  
 
 
 
 
 
  
 
If data from all accounts on the source server should be imported, enter '''all'''.  
 
If data from all accounts on the source server should be imported, enter '''all'''.  
  
 
The Domains parameter must be set to list the domain from which the files are being imported.
 
The Domains parameter must be set to list the domain from which the files are being imported.
 
+
| '''Accounts=test1@<nowiki>example.com</nowiki>,test2@<nowiki>example.com</nowiki>'''
 
 
 
 
|
 
'''Accounts=test1@<nowiki>example.com</nowiki>,test2@<nowiki>example.com</nowiki>'''
 
 
 
 
 
 
 
 
'''Or'''
 
'''Or'''
 
 
'''Accounts=all'''
 
'''Accounts=all'''
 
+
|- style="background:white; color:black"
|-
+
!'''Domains'''
|
+
| When the Accounts parameter is set to '''all''', identify the domains.  
'''Domains'''
+
| '''Domains=<nowiki>domain1.example.com</nowiki>, <nowiki>domain2.example.com</nowiki>'''
 
+
|- style="background:#f0f0f0f0; color:black"
|
+
! '''Types'''
When the Accounts parameter is set to '''all''', identify the domains.  
+
| Specify the type of data that should be imported. This is a comma separated list.  
 
 
|
 
'''Domains=<nowiki>domain1.example.com</nowiki>, <nowiki>domain2.example.com</nowiki>'''
 
 
 
|-
 
|
 
'''''''''Types'''
 
 
 
|
 
Specify the type of data that should be imported. This is a comma separated list.  
 
  
 
To import all content, do not set any values for “types” Comment it out.
 
To import all content, do not set any values for “types” Comment it out.
  
|
+
| '''Types=message, conversation'''
'''Types=message, conversation'''
 
  
 
Types are
 
Types are
Line 261: Line 142:
 
* task
 
* task
 
* briefcase
 
* briefcase
 
+
|- style="background:white; color:black"
|-
+
! '''Resolve'''
|
+
| Use Resolve to determine how to resolve conflicts between the items being imported and the items already in the destination account.  
'''Resolve'''
 
 
 
|
 
Use Resolve to determine how to resolve conflicts between the items being imported and the items already in the destination account.  
 
  
 
Only one value at a time can be set.
 
Only one value at a time can be set.
Line 278: Line 155:
 
* '''Replace''' means replace the existing items with the items being imported
 
* '''Replace''' means replace the existing items with the items being imported
  
 +
| '''Resolve=skip'''
  
  
|
+
|- style="background:white; color:black"
'''Resolve=skip'''
+
! '''ZimbraMailTransport'''
 
+
| Using '''ZimbraMailTransport''' is optional.  
 
 
 
 
|-
 
|
 
'''ZimbraMailTransport'''
 
 
 
|
 
Using '''ZimbraMailTransport''' is optional.  
 
  
 
Include this entry if you want to change the '''ZimbraMailTransport''' to some other MTA.  
 
Include this entry if you want to change the '''ZimbraMailTransport''' to some other MTA.  
 
+
| '''ZimbraMailTransport=smtp:<nowiki>mta.zcs.mail.mydomain.com</nowiki>'''
 
 
 
 
|
 
'''ZimbraMailTransport=smtp:<nowiki>mta.zcs.mail.mydomain.com</nowiki>'''
 
  
 
|}
 
|}

Revision as of 18:27, 10 October 2011

Importing Data between Different Version of ZCS servers using the Zimbra to Zimbra Migration Tool

Use the Zimbra to Zimbra migration tool zmztozmig to import account data from one Zimbra Collaboration Server to another Zimbra Collaboration Server that is running a different version of ZCS. This tool can be used to import files from ZCS 6.0.6 or later to the latest version of ZCS.

The process of migrating accounts to a ZCS server running a later version of ZCS includes:

  • Provisioning the accounts on the destination server before running zmztozmig
  • Editing the zmztozmig.conf file in /opt/zimbra/conf on the source server to configure the import settings
  • Running zmztozmig to import the account’s data to the destination server


When zmztozmig is used to import files, after the data is imported, the data in the accounts on the destination server are not an exact replica of the data in the accounts on the source server. And account preferences are not imported. Also, if the destination accounts do not have the same account IDs as they had on the source server, files that were shared and appointments related to the original sender might not work.

Note: Use the zmmailboxmove command to move an account between two mailbox servers with the same LDAP master.

Preparing the zmztozmig.conf file

Edit the zmztozmig.conf file in /opt/zimbra/conf on the source server to configure the import settings. Account data, including email messages, attachments, contacts, calendar, tasks and briefcase folders for accounts are imported as individual account tgz tar files. Content of the Junk and Trash folders are not imported.

The following information is configured in the file:

  • Login information of the source server
  • Login information of the destination server
  • Domain mapping from source server to destination server
  • Account import details, including which accounts’ to import from and what type of information should be imported
  • Record keeping information, including log directory, whether to keep the tar files after migration, directory for failed migration files
  • How to resolve account import conflicts (resolve)
  • Number of mailboxes to import simultaneously (thread)
  • (Optional) Changes to ZimbraMailTransport that may be required

Following is a description of the parameters that are edited in the zmztozmig.conf file.

Parameter Description Entered as
SourceZCSServer IP address or name of the source server. SourceZCSServer=<source.com&gt;
SourceAdminUser ZCS administrator name for the source server. SourceAdminUser=<sourceadmin>
SourceAdminPwd ZCS administrator password for the source server. SourceAdminPwd=<adminpswrd>
SourceAdminPort Source server admin port - 7071 SourceAdminPort=<port>
TargetZCSServer IP address or name of the destination server where the data is imported. TargetZCSServer=<destination.com>
TargetAdminUser ZCS administrator name for the destination server. TargetAdminUser=<targetadmin>
TargetAdminPwd ZCS administrator password for the destination server. TargetAdminPwd=<adminpswrd>
TargetAdminPort Destination server admin port- 7071. TargetAdminPort=<port>
Threads Set the number of accounts to be imported simultaneously. The default is 1.

Set this at a low number of threads. When you start to import the data, review the source/destination ZCS server CPU usage I/O rate and write to disk per second. If the server has power to run more threads, you can edit the zmztozmig.conf file to increase the threads one at a time.

Threads=<n>
WorkingDirectory The directory path to where the tar’d account data files are downloaded. WorkingDirectory=/opt/zimbra/data/zmztozmig/work
FailedDirectory The directory path to where tar’d account data files are moved if the account import fails. FailedDirectory=/opt/zimbra/data/zmztozmig/failed
KeepSuccessFiles KeepSuccessFiles is set to FALSE. The tar files are deleted after the data is imported.

If you want to keep the downloaded tar files after they are imported, set this to TRUE.

KeepSuccessFiles=FALSE
SuccessDirectory If you set KeepSuccessFiles to TRUE, identify the directory where tar’d account files are moved after successful imported. SuccessDirectory=/opt/zimbra/data/zmztozmig/successes
LogDirectory A common log file, ztozlog*.log, is created for the complete import process and separate log file are created for each account data file that is imported.

Configure the directory location where log files are saved.

LogDirectory=/opt/zimbra/data/zmztozmig/logs
DomainMap If accounts are being migrated from one domain to another domain, specify the source domain and destination domain.

You can create multiple DomainMap entries if the Accounts list contains accounts from different domains.

DomainMap=fromdomain.com todomain.com
Accounts Specify which account’s data should be imported. This is a comma separated list of accounts.

If data from all accounts on the source server should be imported, enter all.

The Domains parameter must be set to list the domain from which the files are being imported.

Accounts=test1@example.com,test2@example.com

Or Accounts=all

Domains When the Accounts parameter is set to all, identify the domains. Domains=domain1.example.com, domain2.example.com
Types Specify the type of data that should be imported. This is a comma separated list.

To import all content, do not set any values for “types” Comment it out.

Types=message, conversation

Types are

  • message
  • conversation
  • contact
  • appointment
  • task
  • briefcase
Resolve Use Resolve to determine how to resolve conflicts between the items being imported and the items already in the destination account.

Only one value at a time can be set.

Values:

  • Skip ignores duplicates
  • Modify updates older items
  • Reset deletes the older subfolders
  • Replace means replace the existing items with the items being imported
Resolve=skip


ZimbraMailTransport Using ZimbraMailTransport is optional.

Include this entry if you want to change the ZimbraMailTransport to some other MTA.

ZimbraMailTransport=smtp:mta.zcs.mail.mydomain.com

Provision Accounts on the Destination Server

The accounts that will have their data imported must be provisioned on the destination server before you can import the files.

See the Zimbra Collaboration Server Administration Guide for details about provisioning accounts.

Import Account Data to the New Zimbra Server

Run the zmztozmig migration tool on the source server as zimbra.

/opt/zimbra/libexec/zmztozmig –f /opt/zimbra/conf/zmztozmig.conf

The data on the source server is zipped and imported to the destination server. If you configured KeepSuccessFiles to FALSE, the tgz file is deleted by default once the account data is imported.

A common log file, ztozlog*.log, is created for the complete process and separate log files are created for data of each account that is imported. These should be saved until the new account data has been verified.

After you verify that the account data was imported correctly, you can delete the account on the source server.

Jump to: navigation, search