Sometimes in a batch, I see information that says items were skipped during the migration. However, when I look at the target mailbox after the migration it has the same number of items as the source mailbox?!
What is being skipped and why?
The mailbox migrator keeps a history of items that is has copied to the target mailbox. This history is a table of item identifiers that exist in an associated item in the target folder (associated items are an Exchange feature and allow for non-user, non-visible data to be “associated” with a folder).
If the migrator were to work on the same mailbox and folders a subsequent time beyond the first pass, it will have knowledge of previously copied items. By design, the migrator always checks to see if the target folder has the history table, and if so skips any source items for which exist in the table. In this way previously copied items are skipped and not duplicated.
However, the question asked is answered by a specific scenario:
Unless one has become familiar with the migration pattern, it is likely not known that the migrator will automatically restart and re-queue any mailbox failure 3 times before finally marking the mailbox as “Failed”. These restarts can happen for many reasons and our reasoning is, from experience, that failures are often the result of transient issues that self-correct after a few seconds or minutes. By re-queuing failed mailboxes, which send the mailbox to the bottom of the batch, it usually creates enough of a delay between the failure and the restart such that the transient issue passes and the mailbox will succeed on the subsequent attempt.
However, during the failed attempt, it very likely could be that many items were successfully migrated to the target mailbox. We wouldn’t want duplication to occur when the mailbox is restarted in such a scenario, so the use of the history table is employed to prevent duplication. The following shows a more visual representation of the pattern:
First Pass on Mailbox
1234 items of the 2821 total items for the mailbox are copied.
4 of the 15 total folders in the mailbox are processed.
During the processing of the 4th folder, 35 of the 122 items were copied before the mailbox failed.
The reports and logging at this point would show that 1234 items were copied and none were skipped.
The mailbox is re-queued.
Second Pass on Mailbox
1234 items are skipped because they are seen as previously copied.
The remaining 1587 items in the mailbox are copied.
The logging and reporting now shows that 1587 items were migrated and 1234 items were skipped.
When looking at the logs and reports, one must consider that a mailbox may have restarted one or more times and that if only the last data is reviewed, such will skew the analysis and can make it look like items were missed or ignored. The main migration log for a mailbox will show each attempt on a mailbox and the javascript in the log file will calculate the number of passes the mailbox received. Be sure to analyze the log file for such behavior.
The migration summary log is only appended with data when a mailbox reaches the completed or backfill-ready state. As such, the summary (and sharepoint logging as well) will only show the last pass on the mailbox, assuming there were some restarts along the way. The report then may show that some items were skipped. This simply means that during that pass, items were skipped because they were found to have been previously copied.
