Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail keeps getting stuck on "migrating data." Help?

I recently upgraded to the most recent OS X system. Have a 13 inch "mid-2010" MacBook. Everything upgraded fine, except for Mail. It keeps getting stuck on the "migrating data" stage. Is there a way to get whatever kink worked out and get the installation to go through?


Thanks!

MacBook (13-inch Mid 2010), OS X Mavericks (10.9.4)

Posted on Aug 9, 2014 12:43 PM

Reply
Question marked as Best reply

Posted on Aug 9, 2014 1:02 PM

Quit Mail. Force quit if necessary.

Back up all data before proceeding.

Triple-click anywhere in the line below on this page to select it:

~/Library/Mail/V2/MailData

Copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select

Go Go to Folder

from the menu bar. Paste into the box that opens by pressing command-V, then press return.

A folder window will open. Inside it there should be files with names as follows:

Envelope Index

ExternalUpdates.storedata

Move those files to the Desktop, leaving the window open. Other files in the folder may have longer names that begin as above. Move those files, if any, to the Trash.

Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is damaged and that Mail has to quit. ClickOK. Typically, the process takes a few minutes, but it may take hours if you have gigantic mailboxes. In that case, you may be able to speed things up by temporarily adding your home folder to the Privacy list in the Spotlight preference pane. Remove it when Mail has finished importing.

Test. If Mail now works as expected, you can delete the files you moved to the Desktop. Otherwise, post your results.

11 replies
Question marked as Best reply

Aug 9, 2014 1:02 PM in response to racheydee

Quit Mail. Force quit if necessary.

Back up all data before proceeding.

Triple-click anywhere in the line below on this page to select it:

~/Library/Mail/V2/MailData

Copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select

Go Go to Folder

from the menu bar. Paste into the box that opens by pressing command-V, then press return.

A folder window will open. Inside it there should be files with names as follows:

Envelope Index

ExternalUpdates.storedata

Move those files to the Desktop, leaving the window open. Other files in the folder may have longer names that begin as above. Move those files, if any, to the Trash.

Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is damaged and that Mail has to quit. ClickOK. Typically, the process takes a few minutes, but it may take hours if you have gigantic mailboxes. In that case, you may be able to speed things up by temporarily adding your home folder to the Privacy list in the Spotlight preference pane. Remove it when Mail has finished importing.

Test. If Mail now works as expected, you can delete the files you moved to the Desktop. Otherwise, post your results.

Aug 9, 2014 2:03 PM in response to racheydee

Launch the Console application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad. Click Utilities, then Console in the icon grid.

The title of the Console window should be All Messages. If it isn't, select

SYSTEM LOG QUERIES ▹ All Messages

from the log list on the left. If you don't see that list, select

View ▹ Show Log List

from the menu bar at the top of the screen.Click the Clear Display icon in the toolbar. Quit Mail, then relaunch and start the migration again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.

The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.

Please don't indiscriminately dump thousands of lines from the log into this discussion.

Please don't post screenshots of log messages—post the text.

Some private information, such as your name, may appear in the log. Anonymize before posting.

Aug 9, 2014 2:49 PM in response to Linc Davis

8/9/14 5:13:08.819 PM Mail[514]: Using V1 Layout

8/9/14 5:13:09.102 PM Mail[514]: Upgrading Library from 4.168 to 4.168

8/9/14 5:14:02.413 PM Mail[514]: Failed to set Spotlight attributes for (

"/Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/361.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/362.partial.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/363.partial.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/364.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/365.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/366.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/367.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/368.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/369.partial.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/370.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/371.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/372.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/373.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/374.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/375.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/376.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/617.partial.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/All Mail.imapmbox/Messages/618.partial.emlx",

.gmail.com/[Gmail]/All Mail.imapmbox/Messages/415174.emlx",

). Mailbox directory will be reimported.

8/9/14 5:14:50.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x1000): p=518[GoogleSoftwareUp] final status 0x0, allowing (remove VALID) page

8/9/14 5:14:53.623 PM Mail[514]: Failed to set Spotlight attributes for (

imap.gmail.com/[Gmail]/All Mail.imapmbox/Messages/8826789.emlx"

). Mailbox directory will be reimported. errno=2

8/9/14 5:15:35.468 PM Mail[514]: Failed to set Spotlight attributes for (

"Users/rld/Library/Mail/IMAP-****/[Gmail]/Drafts.imapmbox/Messages/6272342.emlx",

8/9/14 5:16:02.414 PM Mail[514]: Failed to set Spotlight attributes for (

"Users/rld/Library/Mail/IMAP-****/[Gmail]/Important.imapmbox/Messages/14100.emlx",

/IMAP-****/[Gmail]/Important.imapmbox/Messages/66785.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/Important.imapmbox/Messages/66818.emlx",

"Users/rld/Library/Mail/IMAP-****/[Gmail]/Important.imapmbox/Messages/66836.emlx",


it went on like this for every IMAP mailbox i had for my gmail account.


<Email Edited By Host>

Aug 9, 2014 4:05 PM in response to racheydee

Back up all data. Quit Mail.

Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination command-C:

~/Library/Mail

In the Finder, select

Go Go to Folder...

from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return. A folder will open. Move the the items with names beginning in "IMAP" to the Trash. Relaunch Mail.

Aug 9, 2014 4:44 PM in response to Linc Davis

it is still getting stuck. launched console, copied and pasted the first few messages below. at this point, i kind of want to wipe all mail history and set it up from scratch. is that possible?


thank you for your help, by the way.


8/9/14 7:43:24.732 PM Mail[608]: Using V1 Layout

8/9/14 7:43:24.852 PM Mail[608]: Upgrading Library from 4.168 to 4.168

8/9/14 7:43:25.200 PM Mail[608]: Error determining type identifier for /Users/rld/Library/Mail/IMAP-rachel.lenore@imap.gmail.com: Error Domain=NSCocoaErrorDomain Code=260 "The file “IMAP-rachel.lenore@imap.gmail.com” couldn’t be opened because there is no such file." UserInfo=0x608000467800 {NSURL=file:///Users/rld/Library/Mail/IMAP-rachel.lenore@imap.gmail.com, NSFilePath=/Users/rld/Library/Mail/IMAP-rachel.lenore@imap.gmail.com, NSUnderlyingError=0x6080002507d0 "The operation couldn’t be completed. No such file or directory"}

8/9/14 7:43:30.655 PM Mail[608]: unresolvedBaseMailDirectory /Users/rld/Library/Containers/com.apple.mail/Data/Library/Mail

8/9/14 7:43:30.656 PM Mail[608]: resolvedBaseMailDirectory /Users/rld/Library/Mail

Jul 31, 2015 7:49 AM in response to racheydee

I managed to solve the problem of mail migration hanging on the migrating data step and not making any progress.


I noticed that I could not enable email in iCloud or the Internet Accounts System Preferences. As it turns out, I had a second account on this machine that was already connected to iCloud. I logged into the other account (I have a separate admin account for security purposes), logged out of iCloud in iCloud System Preferences.


I also logged out of iCloud in the main (non-admin) account. When I logged back in, I was able to enable email. Once email was enabled, I was able to complete the migration of my email accounts completing all steps and retaining all of the data, smart folders, etc.


Hope this helps others.

Mail keeps getting stuck on "migrating data." Help?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.