Sunday, January 17, 2016

Recovering selected OS X Mail.app messages from a carbon copy cloner backup

Somehow I’d enabled my iCloud Mail account in Yosemite Mail.app. This is irksome, because I don’t use it and, sooner or later, I’d somehow send outgoing emails using that sending service.

Which I did. Somehow. 

Which meant I had a set of Sent emails in the wrong place. Impulsively, in Mail.app, I tried dragging them from iCloud Sent folder to Gmail Sent folder. Something was happening … the dialog “Outgoin Messages”. Yikes! I don’t want them to be resent! So I canceled. (I was wrong, this is what Mail.app does when one is copying from a local store to an IMAP folder.)

All the emails vanished everywhere (I think this is a bug). There was nothing in iCloud Mail on web or OS X and nothing in Gmail — or anywhere else. So annoying — especially because I think I made the same mistake years ago.

I could live without those 49 errant emails, but it’s vexing to lose data. So I turned off internet connectivity and dug into last night’s Carbon Copy Cloner backup (Time Machine restores are so painfully slow I use them as a last resort, and I’m not sure how they behave for attempts to restore a specific set of emails.) The User/Library folder is hidden, but Go To Folder works if you know the path. On my system it’s User\Library\Mail. The actual folder varies by the age of one’s system, my messages are in a V2 folder, not a V3 folder. (I saw lots of weird stuff in there, like a [Mail Lost+Found] folder with old .mbox files. I need to dig through those. OS X Mail is just weird.)

The folder names were odd. The one called IMAP-…. visi.com has my current Gmail data, but I haven’t used visi.com for 10-15 years. Apparently OS X kept the original account name from my 10.3 days. Have I mentioned OS X Mail.app Preferences are kinda horked?

 Screen Shot 2016 01 17 at 10 52 58 AM

The missing iCloud message were in AosIMAP (wonder what Aos stands for?) in a Sent Messages.mbox folder. I copied that to the desktop and used Mail.app Import to bring them in. Despite the .mbox extension I had to use the Mail.app importer, not the .mbox importer.

All the messages were recovered. I found I could copy them safely into the Yosemite Mail.app “All Mail” folder that corresponds to Google’s All Mail, so they were back on Google for search purposes while also available on Mail.app (yes, Mail.app/Gmail integration is scary, mostly Google’s issue).

Sometime I’m going to dig around Mail Lost+Found to see if it really contains old lost messages. I like to keep my data; I’ve got Eudora and Netscape emails in OS X Mail.app from the early 90s.

Update: Most of the .mbox folders in “Mail Lost+Found” were very small. The few that were larger just duplicated messages I already had. So I cleaned out that folder.

No comments:

Post a Comment