A friend recently had the HDD in his MacBook Pro Late 2011 (macOS 10.13.6) replaced with a SSD, and had made a Time Machine backup beforehand.
While helping him with some things in Mail, I noticed the Inbox for his Gmail account had over 2,000 messages in it, and suggested he create a maibox in On My Mac and transfer them them there for safety.
When we tried to copy the messages to the new folder, however, they wouldn’t go into it, which I thought was strange.
Later, I also noticed the Trash on his Desktop had a Recovered Files folder in it that contained a Desktop folder, which seemed empty.
When he emptied the Trash, though, there was a brief message saying that some 2,000 or so files were being deleted.
Back in Mail, his Inbox was now empty, as was the Inbox in his Gmail account accessed via the Web.
Is there any chance the messages from the Gmail Inbox can be recovered from the Time Machine backup?
Have you looked in Trash in Gmail? In theory, if anything was deleted normally from Gmail, it should go in Gmail’s Trash mailbox.
I’ve found that Mail isn’t very good at reflecting the current state of Gmail, and moving or deleting items in Mail doesn’t alway do what you expect in Gmail, or at least do it in the time frame you’d expect. It’s always best to do such maintenance in Gmail’s Web interface.
You can certainly recover the inbox. If you’re familiar with the way Mail stores it’s Mailboxes and their location… then copy the gmail inbox folder from the backup to the desktop then in Mail import it. It’ll show up in a Import folder. From there you can move it to a new folder or re-upload to Gmail.
If you need more in depth details let me know and I can dig them up!
Someone else is going to be doing this so I don’t have to know exactly how to do it, but I am curious to know if Mailboxes are stored the same way in Time Machine as on a clone so they can just be copied?
Time Machine backups are (after accounting for all the hard links) a directory full of clones. Locate the directory for the volume and date, then find the file in there. Copy it to your regular file system (e.g. your desktop or home directory) and you’re good to go.
For example, here’s what I see on my system running Catalina (Balrog is the computer’s name and the name of the root file system):
$ cd "/Volumes/Time Machine"
$ ls
Backups.backupdb tmbootpicker.efi
$ cd Backups.backupdb
$ ls
Balrog
$ cd Balrog
$ ls
...
2020-11-14-143720 2020-11-24-150339 2020-11-25-080711
2020-11-15-130817 2020-11-24-160528 2020-11-25-100125
2020-11-16-112005 2020-11-24-170700 Latest
$ cd Latest
$ ls
Balrog Balrog - Data Recovery
$ cd "Balrog - Data"
$ ls
Applications Network Users cores opt sw
Library System Volumes mnt private usr
Or you can do it the easier way using the Finder’s interface:
Make sure the Time Machine app icon is in your Dock. It’s really inconvenient otherwise.
Navigate to the folder with the file you want to restore
Click the Time Machine app icon. The Finder will change to its infinite-list-of-folders view.
Select a date from the bar on the right edge of the screen. Wait for the animation to complete.
Select the file.
If you wan to restore it (overwriting the current version of the file), click the “Restore” button.
If you want to copy the old version elsewhere (preserving the original), right-click the file and select “Restore … to …”. Then (after the Time Machine animation completes), select the folder you’d like to copy it to.