User Tools

Site Tools


internet:mail:zimbra:zimbra_migrate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internet:mail:zimbra:zimbra_migrate [2022/09/01 10:07]
gcooper
internet:mail:zimbra:zimbra_migrate [2023/09/20 09:42] (current)
gcooper
Line 1: Line 1:
 ====== Zimbra Migration ====== ====== Zimbra Migration ======
  
-FIXME This page is being rewritten!+**Method 1**: https://community.zextras.com/migrate-zimbra-from-one-server-to-another-server-method-1/ 
 + 
 +**Method 2**: https://community.zextras.com/migrate-zimbra-from-one-server-to-another-server-method-2/ 
 + 
 +**Method 3**: https://community.zextras.com/migrate-zimbra-from-one-server-to-another-server-method-3/
  
 See also **[[internet:mail:zimbra:zimbra_ose|Zimbra Collaboration Server OSE]]** See also **[[internet:mail:zimbra:zimbra_ose|Zimbra Collaboration Server OSE]]**
Line 10: Line 14:
  
 <note warning>Import and export of large mailboxes will cause high CPU and, especially, disk IO.  Try to perform import/export operations when users will be impacted the least.</note> <note warning>Import and export of large mailboxes will cause high CPU and, especially, disk IO.  Try to perform import/export operations when users will be impacted the least.</note>
 +
 +===== Zextras Backup Migration =====
 +
 +**Read this entire page first: [[https://community.zextras.com/zimbra-migration-with-zextras-backup|Migrate Using Zextras Backup]]**
 +
 +:!: If you are migrating from one Zimbra ZCS server to another, this is the way to go.  It is fairly simple and very effective.
 +
 +  * Accounts
 +  * CoS
 +  * Mail
 +  * Calendar Items
 +  * Briefcase Items
 +  * Drive Items
 +  * Preferences
 +  * Etc.
 +
 +==== Overview ====
 +
 +<note tip>For Zextras notifications regarding command line backup actions, see **Zimbra Admin -> Zextras -> Notifications**. </note>
 +
 +<note tip>For best performance, use a fast disk as the migration backup location, rather than an NFS share. The difference can be hours instead of days!</note>
 +
 +<note tip>For best performance, use multiple accounts on your restore command to restore more than one user at a time. The difference can be hours instead of days!</note>
 +
 +  - Ensure that **Zextras Backup** is installed on **both** the source and destination servers
 +    * You can configure Zextras Backup on the destination server permanently
 +  - **Disable Zextras Backup Realtime Scanner** on both servers
 +  - **Disable scheduled SmartScans** on both servers
 +  - **Mount** the backup media on the source server
 +    * **Set permissions** to ''zimbra:zimbra''
 +    * Usually ''/opt/zimbra/backup/zextras''
 +  - Run a Zextras Backup **SmartScan** backup on the old server
 +    * Initializing Zextras Backup will run a SmartScan
 +    * May take hours
 +    * Do not run another Zextras Baackup (SmartScan) on the source server until you are ready for the final cutover
 +  - **Dismount** the backup media from the source server
 +  - **Mount** the backup media on the destination server
 +    * Use a **temporary mount point** such as ''/mnt/tmp''
 +    * **Reset the permissions** to ''zimbra:zimbra''
 +  - **Start** the restore
 +    * Use **multiple threads** for a quicker restore
 +    * May take days
 +  - **Dismount** the backup media from the destination server
 +  - **Mount** the migration backup media back on the source server
 +    * Use exactly the **same mount point** previously used
 +    * **Reset the permissions** to ''zimbra:zimbra''
 +  - When you want to do the actual migration, **stop mail flow** on port 25
 +    * **Verify** the mail has stopped flowing
 +    * Incoming mail will be delayed
 +  - Run another (final) **SmartScan** on the source server
 +    * It won't take long as it's an incremental backup
 +  - **Dismount** the migration backup media from the source server
 +  - **Mount** the migration backup media on the destination server
 +    * Use a **temporary mount point** such as ''/mnt/tmp''
 +    * **Reset the permissions** to ''zimbra:zimbra''
 +  - **Start** the restore
 +    * Use **multiple threads** for a quicker restore
 +    * This restore will be much quicker
 +    * May still take hours depending on how much mail has flowed since the first pass
 +  - **Dismount** the migration backup media from the destination server
 +  - **Enable Zextras Backup Realtime Scanner** on the destination server
 +  - **Enable scheduled SmartScans** on the destination server
 +
 +
 +==== Restore ====
 +
 +<file>
 +mkdir /mnt/tmp
 +chmod 777 /mnt/tmp/
 +mount -t nfs ip.of.nfs.svr:/path/to/backup /mnt/tmp/
 +chown -R zimbra:zimbra /mnt/tmp
 +su - zimbra
 +zxsuite backup doExternalRestore /mnt/tmp concurrent_accounts 5
 +</file>
 +
 +==== Verify Proxy Settings ====
 +
 +Check all domains:
 +
 +<file>
 +for dom in $(zmprov gad); do zmprov gd $dom zimbraPublicServiceProtocol zimbraPublicServiceHostname zimbraPublicServicePort; done
 +</file>
 +
 +Modify all domains:
 +
 +<file>
 +for dom in $(zmprov gad); do zmprov md $dom zimbraPublicServiceProtocol https zimbraPublicServiceHostname zimbra.yourdomain.tld zimbraPublicServicePort 443; done
 +</file>
 +
  
 ---- ----
Line 137: Line 230:
  
 ==== Import ==== ==== Import ====
 +
 +<note tip>The ''resolve='' parameter has several options:
 +
 +  * ''skip'' ignores duplicates of old items, it’s also the default conflict-resolution.
 +  * ''modify'' changes old items.
 +  * ''reset'' will delete the old subfolder (or entire mailbox if /).
 +  * ''replace'' will delete and re-enter items
 +
 +:!: ''Reset'' will be a bit faster on an empty destination mailbox because it skips most dupe checks.</note> 
 +
 +
 +<note tip>If you get a timeout error, try changing this setting:
 +
 +<file>
 +zmlocalconfig socket_so_timeout
 +zmlocalconfig -e socket_so_timeout=3000000
 +
 +# change it back when you complete the import(s)
 +zmlocalconfig -e socket_so_timeout=30000
 +zmlocalconfig --reload
 +</file></note>
  
 === Merge with Existing === === Merge with Existing ===
Line 164: Line 278:
 See also **[[internet:mail:moving_to_new_mailserver#imap_to_zimbra_example|Migrating to a New Mail Server]]** See also **[[internet:mail:moving_to_new_mailserver#imap_to_zimbra_example|Migrating to a New Mail Server]]**
  
-===== Zextras Migration ===== 
  
-**Read this entire page first: [[https://docs.zextras.com/zextras-suite-documentation/latest/backup.html#_incremental_migration_with_zextras_backup|Migrate Using Zextras Backup]]** 
  
-:!: If you are migrating from one Zimbra ZCS server to another, this is the way to go.  It is fairly simple and very effective. 
- 
-  * Accounts 
-  * CoS 
-  * Mail 
-  * Calendar Items 
-  * Briefcase Items 
-  * Drive Items 
-  * Preferences 
-  * Etc. 
- 
-==== Overview ==== 
- 
-<note tip>For best performance, use a fast disk as the migration backup location, rather than an NFS share. The difference can be hours instead of days!</note> 
- 
-<note tip>For best performance, use multiple threads on your restore command to restore more than one user at a time. The difference can be hours instead of days!</note> 
- 
-  - Ensure that **Zextras Backup** is installed on **both** the source and destination servers 
-    * You can configure Zextras Backup on the destination server permanently 
-  - **Disable Zextras Backup Realtime Scanner** on both servers 
-  - **Disable scheduled SmartScans** on both servers 
-  - **Mount** the backup media on the source server 
-    * **Set permissions** to ''zimbra:zimbra'' 
-    * Usually ''/opt/zimbra/backup/zextras'' 
-  - Run a Zextras Backup **SmartScan** backup on the old server 
-    * Initializing Zextras Backup will run a SmartScan 
-    * May take hours 
-    * Do not run another Zextras Baackup (SmartScan) on the source server until you are ready for the final cutover 
-  - **Dismount** the backup media from the source server 
-  - **Mount** the backup media on the destination server 
-    * Use a **temporary mount point** such as ''/mnt/tmp'' 
-    * **Reset the permissions** to ''zimbra:zimbra'' 
-  - **Start** the restore 
-    * Use **multiple threads** for a quicker restore 
-    * May take days 
-  - **Dismount** the backup media from the destination server 
-  - **Mount** the migration backup media back on the source server 
-    * Use exactly the **same mount point** previously used 
-    * **Reset the permissions** to ''zimbra:zimbra'' 
-  - When you want to do the actual migration, **stop mail flow** on port 25 
-    * **Verify** the mail has stopped flowing 
-    * Incoming mail will be delayed 
-  - Run another (final) **SmartScan** on the source server 
-    * It won't take long as it's an incremental backup 
-  - **Dismount** the migration backup media from the source server 
-  - **Mount** the migration backup media on the destination server 
-    * Use a **temporary mount point** such as ''/mnt/tmp'' 
-    * **Reset the permissions** to ''zimbra:zimbra'' 
-  - **Start** the restore 
-    * Use **multiple threads** for a quicker restore 
-    * This restore will be much quicker 
-    * May still take hours depending on how much mail has flowed since the first pass 
-  - **Dismount** the migration backup media from the destination server 
-  - **Enable Zextras Backup Realtime Scanner** on the destination server 
-  - **Enable scheduled SmartScans** on the destination server 
- 
- 
-==== Restore ==== 
- 
-<file> 
-mkdir /mnt/tmp 
-chmod 777 /mnt/tmp/ 
-mount -t nfs ip.of.nfs.svr:/path/to/backup /mnt/tmp/ 
-chown -R zimbra:zimbra /mnt/tmp 
-su - zimbra 
-zxsuite backup doExternalRestore /mnt/tmp concurrent_accounts 5 
-</file> 
  
 ===== Migrate a Domain Off Your Server ===== ===== Migrate a Domain Off Your Server =====
internet/mail/zimbra/zimbra_migrate.1662048469.txt.gz · Last modified: 2022/09/01 10:07 by gcooper