Restore IMAP-based email from Time Machine

I am trying to assist my mother, who deleted all her email messages somehow from her Gmail account, which she accesses using the Apple Mail app using IMAP. She has a backup of her entire system, which I believe includes the messages downloaded via IMAP.


So far, while working in OFFLINE mode to avoid impacting Google's servers, I have tried accessing the Mail folder inside her Library folder within the Time Machine backup from a month before the emails were deleted. I copied that folder to a new user account and launching Mail app. The messages and folders did not show up. I also tried using the Import function to import from the .mbox files, which showed a progress bar and the app declared success, but no folders nor any individual messages showed up.


My next idea is to use my mother's computer ONLINE and copy all the folders from Gmail to On My Mac, thus making them local only. I would then restore from Time Machine backup onto another system and allow Gmail to synchronize with the computer, hoping the email server will copy all the email messages back into their folders.


Any other advice/recommendations?

Posted on Aug 24, 2024 10:57 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 24, 2024 11:27 AM

Unfortunately, since macOS Catalina, although Time Machine (TM) still backs up the Mail app, you will no longer be able to recover mail via the TM interface. Instead, you will need to use the Finder app for that purpose. Not sure why Apple did this, but that's currently how it works.


Here are the steps:

  1. If running, close the Apple Mail app.
  2. Open a new Finder window: Finder > File > New Finder Window
  3. To view hidden files, use the <cmd><shift><period> key combination. Note: They don't need to be held down simultaneously.
  4. Select your Time Machine backup drive from Finder.
  5. Open: Backups.backupdb > Your Mac's Name > The backup folder with the date you want to restore from > Macintosh HD or Macintosh HD - Data (on Catalina+) > Users > Your User Name > Library > Mail > Vx (where x = 11 for Sonoma)
  6. Copy (NOT move) the entire V11 folder somewhere on your Mac, preferably somewhere not syncing with a cloud service. A good place would be the Downloads folder.
  7. Open the V11 folder you just copied to the Downloads folder. You’ll see a bunch of alphanumeric folders ... one for each email account and one for the "On My Mac" mailboxes. Open each one until you find the mailboxes you’re looking for. Be sure to note the directory path to where it is located.
  8. Open the Mail app.
  9. Choose File > Import Mailboxes, navigate to the noted location
  10. Choose “Import as Apple Mail”.
  11. Next, in the Mail app, you’ll see a new “Import” folder, maybe with another sub folder. Your mail should be in there.
3 replies
Question marked as Top-ranking reply

Aug 24, 2024 11:27 AM in response to cmodrisc2164

Unfortunately, since macOS Catalina, although Time Machine (TM) still backs up the Mail app, you will no longer be able to recover mail via the TM interface. Instead, you will need to use the Finder app for that purpose. Not sure why Apple did this, but that's currently how it works.


Here are the steps:

  1. If running, close the Apple Mail app.
  2. Open a new Finder window: Finder > File > New Finder Window
  3. To view hidden files, use the <cmd><shift><period> key combination. Note: They don't need to be held down simultaneously.
  4. Select your Time Machine backup drive from Finder.
  5. Open: Backups.backupdb > Your Mac's Name > The backup folder with the date you want to restore from > Macintosh HD or Macintosh HD - Data (on Catalina+) > Users > Your User Name > Library > Mail > Vx (where x = 11 for Sonoma)
  6. Copy (NOT move) the entire V11 folder somewhere on your Mac, preferably somewhere not syncing with a cloud service. A good place would be the Downloads folder.
  7. Open the V11 folder you just copied to the Downloads folder. You’ll see a bunch of alphanumeric folders ... one for each email account and one for the "On My Mac" mailboxes. Open each one until you find the mailboxes you’re looking for. Be sure to note the directory path to where it is located.
  8. Open the Mail app.
  9. Choose File > Import Mailboxes, navigate to the noted location
  10. Choose “Import as Apple Mail”.
  11. Next, in the Mail app, you’ll see a new “Import” folder, maybe with another sub folder. Your mail should be in there.

Aug 24, 2024 11:23 AM in response to cmodrisc2164

IMAP folders by default are stored on the server. Only if you specify an On My Mac folder for those messages, will Time Machine back them up. You can contact Google tech support if you think you might have a date range they arrived and were deleted that Google might have backed up on their server. If any other web host hosted the IMAP messages, check with them.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Restore IMAP-based email from Time Machine

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