Zimbra到Zimbra的迁移
在ZCS服务器的不同版本之间使用Zimbra数据导入到Zimbra迁移工具
使用Zimbra到Zimbra迁移工具zmztozmig从一个Zimbra协作服务器导入帐户数据到另一个正在运行不同版本的ZCS的Zimbra协作服务器。 这个工具可以用来导入文件从ZCS 6.0.6或更高版本到最新版本的ZCS。
迁移帐户到运行最高版本的ZCS的服务器上的过程包括:
- 在运行zmztozmig前在目标服务器上配置帐户
- 编辑源服务器上/opt/zimbra/conf 下的 zmztozmig.conf文件来配置导入设置
- 运行zmztozmig导入帐户的数据到目标服务器
当zmztozmig被用来导入文件,导入数据后,在目标服务器上的帐户数据不是在源服务器上的帐户数据的精确副本。 帐户偏好不被导入。 此外,如果目标帐户不具有在源服务器上相同的帐户ID,文件共享和指定相关原始发件人可能无法正常工作。注意:使用zmmailboxmove命令,在两个邮箱服务器之间移动使用相同的LDAP主帐户。
准备zmztozmig.conf文件
在源服务器上编辑/opt/zimbra/conf下的zmztozmig.conf文件,配置导入设置。 账户数据,包括电子邮件,附件,联系人,日历,任务和帐户的公文包文件夹被导入到个人账户tgz tar文件。 垃圾邮件和废件箱的内容不被导入。
文件中配置以下信息:
- 源服务器的登录信息
- 目标服务器的登录信息
- 从源服务器到目标服务器的域映射
- 帐户导入详细信息,包括账户导入来源和应该导入什么类型的信息
- 记录信息,包括日志目录,是否保留迁移后的tar文件,失败的迁移文件目录
- 如何解决帐户导入冲突( 解决 )
- 同时导入邮箱数量( 线程 )
- (可选)对ZimbraMailTransport可能需要更改
以下是编辑在zmztozmig.conf文件中的参数的描述。见下表.
目标服务器上提供帐户
置备的帐户导入数据必须在目标服务器上,然后才能导入文件。
有关设置帐户的详细信息,请参阅Zimbra协作服务器管理指南。
导入帐户数据到新Zimbra服务器
在Zimbra的源服务器上运行zmztozmig迁移工具。
/opt/zimbra/libexec/zmztozmig –f /opt/zimbra/conf/zmztozmig.conf
在源服务器上的数据被压缩和被导入到目标服务器。 如果您配置KeepSuccessFiles为FALSE,默认情况下,一旦该帐户数据导入,tgz文件就会被删除,ztozlog*.log,一个常见的日志文件,为每个被导入的帐户创建完整过程和单独的日志文件。 这些应该被保存,直到新的帐户数据得到了验证。
在您确认该帐户的数据被正确导入后,可以删除源服务器上的帐户。
Parameter | Description | Entered as |
---|---|---|
SourceZCSServer | IP address or name of the source server. | SourceZCSServer=<source.com> |
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 setKeepSuccessFiles 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, enterall. 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 toall, 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
|
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:
|
Resolve=skip
|
ZimbraMailTransport | UsingZimbraMailTransportis optional.
Include this entry if you want to change theZimbraMailTransportto some other MTA. |
ZimbraMailTransport=smtp:mta.zcs.mail.mydomain.com |