Zmmboxmove

Revision as of 17:12, 23 March 2015 by Jorge de la Cruz (talk | contribs)

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.6 Article ZCS 8.6


Zmmboxmove

The CLI command zmmboxmove is used to move mailboxes. The destination server manages the overall move process. Using the zmmboxmove command significantly reduces the account lockout time.The CLI command zmmboxmove is used to move mailboxes from one Zimbra server to another. Mailboxes can be moved between Zimbra servers that share the same LDAP server. All the files are copied to the new server and the LDAP is updated. After the mailbox is moved to a new server a copy still remains on the older server, but the status of the old mailbox is closed. Users cannot log on and mail is not delivered. You should check to see that all the mailbox content was moved successfully before purging the old mailbox.

Syntax

Type the following command for each account you want to move to another data-va virtual machine.

   zmmboxmove -a useraccount --from <src> --to <dest> [sync]

This sample command moves user1 from the Zimbra srv2 to srv1. When an account move finishes, a success or failure notice appears.

   zmmboxmove -a user1@domain.com -f srv2.domain.com -t srv11.domain.com sync

Description

Long Name Short Name Description
--account -a <a> Email address of account to move
--help -h Displays the usage options for this command
--from -f <arg> Mail server hostname. Server where the --account mailbox is located
--to -t <arg> Destination server
--sync -s

Migration Logs

This is the example of a succesful migration using the /opt/zimbra/log/mailbox.log

2015-03-23 16:19:54,275 INFO  [qtp509886383-176:https://192.168.211.21:7071/service/admin/soap/MoveMailboxRequest] [name=zimbra;ip=192.168.211.21;ua=zmmboxmove/8.6.0_GA_1153;] misc - delegated access: doc=MoveMailbox, authenticated account=zimbra, target account=user@zimbra.local
2015-03-23 16:19:54,291 INFO  [qtp509886383-176:https://192.168.211.21:7071/service/admin/soap/MoveMailboxRequest] [name=zimbra;ip=192.168.211.21;ua=zmmboxmove/8.6.0_GA_1153;] soap - MoveMailboxRequest elapsed=25
2015-03-23 16:19:54,303 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] index - OpenLuceneIndex impl=NIOFSDirectory,dir=/opt/zimbra/index/0/2/index/0
2015-03-23 16:19:54,304 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mbxmgr - Mailbox 2 account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1 LOADED
2015-03-23 16:19:54,304 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - Putting mailbox 2 under maintenance.
2015-03-23 16:19:54,307 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - clearing contents of mailbox 2, group 2
2015-03-23 16:19:54,327 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - Ending maintenance and marking mailbox 2 as unavailable.
2015-03-23 16:19:54,331 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] index - OpenLuceneIndex impl=NIOFSDirectory,dir=/opt/zimbra/index/0/2/index/0
2015-03-23 16:19:54,331 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mbxmgr - Mailbox 2 account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1 LOADED
2015-03-23 16:19:54,331 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - Putting mailbox 2 under maintenance.
2015-03-23 16:20:05,765 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mboxmove - Putting account user@zimbra.local under maintenance
2015-03-23 16:20:16,848 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - Ending maintenance and marking mailbox 2 as unavailable.
2015-03-23 16:20:16,972 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mboxmove - Restore started for account user@zimbra.local (8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1) original mailbox id 6
2015-03-23 16:20:16,990 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] index - OpenLuceneIndex impl=NIOFSDirectory,dir=/opt/zimbra/index/0/2/index/0
2015-03-23 16:20:16,993 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mbxmgr - Mailbox 2 account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1 LOADED
2015-03-23 16:20:16,993 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] cache - initializing folder and tag caches for mailbox 2
2015-03-23 16:20:17,005 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mailbox - Putting mailbox 2 under maintenance.
2015-03-23 16:20:17,009 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [] mboxmove - Restoring in append mode to mailbox id 2 for existing account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1.
2015-03-23 16:20:17,020 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] backup - loading schema with version 7.2
2015-03-23 16:20:17,034 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mboxmove - Renaming volume_id column to locator in source table mail_item
2015-03-23 16:20:17,088 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mbxmgr - Mailbox 2 account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1 AVAILABLE
2015-03-23 16:20:17,095 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] index - OpenLuceneIndex impl=NIOFSDirectory,dir=/opt/zimbra/index/0/2/index/0
2015-03-23 16:20:17,095 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mbxmgr - Mailbox 2 account 8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1 LOADED
2015-03-23 16:20:17,095 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] cache - initializing folder and tag caches for mailbox 2
2015-03-23 16:20:17,129 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mboxmove - Restore finished for user@zimbra.local (8ed1a6bd-7247-44a7-b98b-ccd2082ae5e1) original mailbox 6 to mailbox 2
2015-03-23 16:20:17,136 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mboxmove - Account user@zimbra.local moved to zimbra-sn-u14-02.zimbralab.local; account status = active
2015-03-23 16:20:17,136 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mboxmove - Account user@zimbra.local was under maintenance for 11 seconds
2015-03-23 16:20:17,157 INFO  [MailboxMove-user@zimbra.local:zimbra-sn-u14-10.zimbralab.local] [mid=2;] mailbox - got blob list for mailbox 2 (43 blobs)

Review the state of a Migration

During the migration, run the next command to see the number of mailboxes that are migrating:

   zmmboxmovequery 
   Account: zuser@zimbra.local
   Type: move-out
   To: zimbra-sn-u14-02.zimbralab.local
   Started: Mon, 2015/03/23 17:07:49.338 GMT

Purging the account in the old mailbox

Once the account is migrated, purge the account in the old mailbox, is important to run the next command in the old mailbox:

   zmpurgeoldmbox -a zuser@zimbra.local

Just in case, can add the -s flag to be sure to add the old server:

   zmpurgeoldmbox -a zuser@zimbra.local -s zimbra-sn-u14-10.zimbralab.local

Purging Logs

2015-03-23 17:10:10,658 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] misc - delegated access: doc=PurgeMovedMailbox, authenticated account=zimbra, target account=zuser@zimbra.local
2015-03-23 17:10:10,659 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] mboxmove - Purging old mailbox 7 of account zuser@zimbra.local
2015-03-23 17:10:10,659 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] mailbox - already in maintenance, nesting access for mailboxId 7
2015-03-23 17:10:10,675 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] mailbox - clearing contents of mailbox 7, group 7
2015-03-23 17:10:10,711 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] mbxmgr - Mailbox for account fad5561f-bd44-4c10-8d70-1549f1d27cf7 DELETED
2015-03-23 17:10:10,714 INFO  [qtp509886383-9237:https://127.0.0.1:7071/service/admin/soap/PurgeMovedMailboxRequest] [name=zimbra;ip=127.0.0.1;ua=zmpurgeoldmbox/8.6.0_GA_1160;] soap - PurgeMovedMailboxRequest elapsed=62

Identified Support/Known Issues

  • Bug 72449 - "operation sent to wrong host" while moving users between mailbox servers
  • Bug 97649 - RFE: Add option to send a mail when a mailbox move is finished
  • Bug 97650 - RFE: Add option to automatically purge the mailbox when the move is finished
  • Bug 97673 - MoveMailboxRequest doesn't add mid to log metadata
  • Bug 92359 - RFE: A user friendly way to track mailbox move
  • Bug 75507 - zmmboxmove fails when acct not in MySQL
  • Bug 98445 - Ensure zmmboxmove ends sessions on source server
  • Bug 76388 - zmmboxmove does multiple rsync runs for closed accounts
  • Bug 97090 - Memcached has chance to load old zimbraMailHost after zmmboxmove
  • Bug 93362 - multi-server unable to move mailbox , cant move LDAP record
  • Bug 97205 - Duplicate contact/task displayed on device after 2nd zmmboxmove
  • Bug 86610 - zmmboxmove assumes zimbraBackupTarget is the same on source and destination servers


Verified Against: Zimbra Collaboration Suite 8.6, 8.5, 8.0 Date Created: 03/05/2015
Article ID: https://wiki.zimbra.com/index.php?title=Zmmboxmove Date Modified: 2015-03-23



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search