Transferring profile and cache from one Mac to another to preserve old emails
Hi. I have transferred the following two directories from one Mac installation to another Mac:
- `~/Library/Thunderbird/Profiles/`
- `~/Library/Caches/Thunderbird/`
The new installation had already created some default profile, so I updated the `~/Library/Thunderbird/profiles.ini` to point to the profile name of the copied one:
``` [Profile0] Name=default-release IsRelative=1 Path=Profiles/0######2.default
[General] StartWithLastProfile=1 Version=2
[Install712DAF56ABCDEFGH] Default=Profiles/0######2.default Locked=1 ```
With that, all the accounts and passwords are available. On to the issue: I have a cache of old emails from email accounts that I have deleted over the years. These emails are only accessible in the old machine, and are not showing up in the new one.
For instance, the accounts ending in `~` are deleted (on the server) and only show an empty "Inbox" folder on the new machine while the old machine lists all folders and emails within them.
Is it possible to make the emails from the deleted accounts accessible on the new machine, too? Thank you.
সমাধান চয়ন করুন
I've seen this happen when copying a profile folder across computers. The mbox files in which Thunderbird stores local copies of IMAP mail are discarded when Thunderbird starts. I've seen them disappear right before my eyes. I'm sure it is by design. The best option is to move them to the Local Folders account.
- Launch Thunderbird, then for each affected account, open Account Settings → Server Settings → Message Storage. The Local Directory field will show you the exact location of the IMAP account's local storage. This will be a folder inside the ~/Library/Thunderbird/Profiles/0######2.default/ImapMail directory. The folder is named after the account's IMAP server. This is where IMAP mail is locally cached. Open the original/backup copy of this folder. The ~/Library/Caches/Thunderbird folder you copied plays no role here, by the way.
- Copy the original Local Directory to ~/Library/Thunderbird/Profiles/0######2.default/Mail/Local Folders. You can rename it if you so wish, to better distinguish them.
- Restart Thunderbird. They should now be accessible under the Local Folders account.
All Replies (14)
Are they IMAP accounts?
Stans said
Are they IMAP accounts?
Yes, they're all IMAP, but with downloaded/cached emails and attachments that were still browsable on the source machine (now erased but the two directories above are backed up).
redshift778 said
Stans said
Are they IMAP accounts?Yes, they're all IMAP, but with downloaded/cached emails and attachments that were still browsable on the source machine (now erased but the two directories above are backed up).
So I just reinstalled Thunderbird but making sure this time that the two directories from the source machine were in place before the initial launch of the app. The emails under the deleted accounts were actually available, but after quitting and relaunching Thunderbird, they're gone again (as seen in the second image in the OP).
Thanks for any help.
চয়ন করা সমাধান
I've seen this happen when copying a profile folder across computers. The mbox files in which Thunderbird stores local copies of IMAP mail are discarded when Thunderbird starts. I've seen them disappear right before my eyes. I'm sure it is by design. The best option is to move them to the Local Folders account.
- Launch Thunderbird, then for each affected account, open Account Settings → Server Settings → Message Storage. The Local Directory field will show you the exact location of the IMAP account's local storage. This will be a folder inside the ~/Library/Thunderbird/Profiles/0######2.default/ImapMail directory. The folder is named after the account's IMAP server. This is where IMAP mail is locally cached. Open the original/backup copy of this folder. The ~/Library/Caches/Thunderbird folder you copied plays no role here, by the way.
- Copy the original Local Directory to ~/Library/Thunderbird/Profiles/0######2.default/Mail/Local Folders. You can rename it if you so wish, to better distinguish them.
- Restart Thunderbird. They should now be accessible under the Local Folders account.
Stans said
I've seen this happen when copying a profile folder across computers. The mbox files in which Thunderbird stores local copies of IMAP mail are discarded when Thunderbird starts. I've seen them disappear right before my eyes. I'm sure it is by design. The best option is to move them to the Local Folders account. ...
Thanks for the details, Stans. Moving the folders to local is a good idea as it'd stop Thunderbird from trying to sync them, but it did not work when I tried with a couple accounts.
In the attachment, you can see the eBay folder under Local Folder selected while no emails are shown in the background. No other folders in those two accounts load the emails, while in the foreground it can be seen that the folder I copied definitely has some data apparent from the dir size. The source and destination paths of what I copied are also visible at the bottom of the Finder windows, while Thunderbird generated its own .msf and .sbd file/dir. I have tried copying along the original .msf file and relaunching to no avail.
If, as you say, this behavior is likely by design, the reasons aren't entirely apparent. Thank you anyway.
---
There's some issue attaching an image here, so I've instead uploaded it to https://files.catbox.moe/ds1mku.jpg
redshift778 দ্বারা পরিমিত
Stans said
I've seen this happen when copying a profile folder across computers. The mbox files in which Thunderbird stores local copies of IMAP mail are discarded when Thunderbird starts. I've seen them disappear right before my eyes. I'm sure it is by design. The best option is to move them to the Local Folders account. ...
Thanks for the details, Stans. Moving the folders to local is a good idea as it'd stop Thunderbird from trying to sync them, but the contents of the folders did not load when I tried with a couple accounts.
In the attachment, you can see the eBay folder under Local Folder selected while no emails are shown in the background. No other folders in those two accounts load the emails, while in the foreground it can be seen that the folder I copied definitely has some data apparent from the dir size. The source and destination paths of what I copied are also visible at the bottom of the Finder windows, while Thunderbird generated its own .msf and .sbd file/dir. I have tried copying along the original .msf file and relaunching to no avail.
If, as you say, this behavior is likely by design, the reasons aren't entirely apparent. Thank you anyway.
--
There's some issue attaching an image here, so I've instead uploaded it to https://files.catbox.moe/ds1mku.jpg
I see. Let's modify step 2 as follows:
(a) In Thunderbird, create a new folder under the Local Folders account. This is where message data from the affected accounts will be moved to and accessed from, so give it an appropriate name, for example: Archived Accounts. Under this folder, create a subfolder and call it Temp.
(b) Quit Thunderbird.
(c) Open your profile folder in Finder. Inside Mail/Local Folders, you'll see a new folder named Archived Accounts.sbd or whatever name you used in step (a). Now copy the original Local Directory, e.g imap.mail.yahoo-1.com, to ~/Library/Thunderbird/Profiles/0######2.default/Mail/Local Folders/Archived Accounts.sbd. You can rename it if you so wish, to better distinguish them.
Launch Thunderbird.
Thanks again for the prompt reply.
I tried nesting the original IMAP directory under Archived Accounts, but that had the same result.
Thunderbird sees this directory (say imap.mail.yahoo-1.com), creates a file called imap.mail.yahoo-1.com.msf and another directory called imap.mail.yahoo-1.com.sbd. This .sbd directory has copies of the same mail folders from the original IMAP dir, but as empty directories. What I tried was replacing one of this imap.mail.yahoo-1.com.sbd/INBOX/ with just the INBOX file from the original dir, and voila! Hopefully the attachment makes this clearer.
Now, to make the process quicker, I also just tried copying the original IMAP dir and manually appending ".sbd" to it, but that did not work, so I suppose I might just have to do this one mail folder at a time.
Thanks for your help and suggestions. I'll probably move the archived accounts under Local Folders so TB can stop prompting for login or alerting failures when I browse them.
--
I've marked your previous response as a solution; would you mind editing it to mention that those steps will need to be followed by this for anyone else who stumbles here.
redshift778 দ্বারা পরিমিত
Two minor issues:
- twice the space is being used for the archived accounts in the local folder -- copies of the same data live in two dirs and I've tried removing the non-sbd dir and the messages disappear;
- GMail accounts in TB usually have a level of nesting for some default tags, and those messages were not showing up. I created an empty [Gmail] file in the two dirs using touch and it worked (attachment).
There's really no need for manually creating folders in which to place the archived accounts' Local Directories (message data). Once you've created a designated folder under the Local Folders account and that Temp subfolder, you're good to go. Simply identify each Local Directory and move it from ImapMail to the designated folder inside Mail/Local Folders. Also, you don't need to move them one at a time. You can select and move them all in one ago after you've indentified them all. That makes short work of the process, but I cautiously state to copy instead of move (cut) to avoid irreversible blunders that could result in data loss, especially since you're working with a backup copy of the profile folder.
In a nutshell, the process is as follows:
- In Thunderbird, create a designated folder under the Local Folders account.
- Create the Temp subfolder under the designated folder.
- Identify the Local Directory of each of the old accounts.
- Open your profile folder in Finder.
- Quit Thunderbird.
- Copy the old (archived) accounts' local directories from their original location (ImapMail in the original/backup copy) to their new location; the designated .sbd folder in Mail/Local Folders.
- Launch Thunderbird and confirm all is in place.
* twice the space is being used for the archived accounts in the local folder -- copies of the same data live in two dirs and I've tried removing the non-sbd dir and the messages disappear;Simply cleanup after steps that didn't work. In your case, just Quit Thunderbird then delete all the IMAP local directories that you had copied to the root of Mail/Local Folders. As a result, all the IMAP local directories should be inside the designated folder. In your case, using the screenshot you posted in catbox, simply delete all of the files and folders that begin with "imap" in their names. That should leave you with a clean Mail/Local Folders directory containing nothing else except the designated folder and the files used for Trash, Unsent Messages, msgfilterrules and filterlog. When you relaunch Thunderbird, all of the archived accounts' data should exist under the designated folder under the Local Folders account. If that is not the case, then just Quit Thunderbird and clear out the designated folder in Finder (Delete everything that you had copied into the Archived Accounts.sbd folder) then copy the original Local Directories into it.
I know it's a mouthful of folders and directories and you're working with folders within Thunderbird itself, and then inside the profile folder and its backup in Finder, but you'll finally get the hang of it once you know how the items on disk (as seen in Finder) relate to the items in Thunderbird. I'll try to put together an article on this process.
redshift778 said
- GMail accounts in TB usually have a level of nesting for some default tags, and those messages were not showing up. I created an empty [Gmail] file in the two dirs using touch and it worked (attachment).
Yes, each .sbd folder must have a corresponding mbox file (the file you created with no filename extension). If the .sbd folder exists and there is no matching mbox file, then it will not work. I don't know how the [Gmail] mbox file went missing from the original/backup copy of the profile folder in your case.
The existence of both a .sbd folder and its matching mbox file, is exactly the reason why I ammended step 2 above. This is how it works:
When you create a folder in Thunderbird, an mbox file (it has no extension) is created on disk. For example, when you create a designated folder called Archived Accounts under the Local Folders account, an mbox file called "Archived Accounts" is created on disk, in the Mail/Local Folders location. A folder is not created on disk as one would expect, until the folder has a subfolder in Thunderbird. When you create the Temp folder in Thunderbird as a subfolder of the Archived Accounts folder, a new folder called Archived Accounts.sbd is created on disk. Inside it, you find an mbox file called "Temp". Likewise, a Temp.sbd will not be created on disk just yet, until a subfolder is created under the Temp folder in Thunderbird. I amended step two, so that the needed mbox file and matching .sbd folder are created on disk, in readiness for holding the local directories of the old accounts and allowing Thunderbird to properly load their contents. You can still manually create the mbox file, which is just a text file with no extension, like you did using the touch command, and the matching .sbd folder and it would have worked just fine, but I consider it a crude approach that just raises more questions compared to letting Thunderbird create them itself.
Hmm, I think some things were lost in translation. Since you mentioned you may write an article on this, I think I should clarify the final state of my profile, which I've done with some text in the attachment.
I see you've opted to not create a designated folder. That's fine. To get rid of the duplication problem, quit Thunderbird, then move everything from the non-sbd folder to the sbd folder. Delete the now empty non-sbd and replace it with an mbox file of the same name using TOUCH. For example:
- Quit Thunderbird.
- Select everything inside the G-sz folder and move them to the G-sz.sbd folder.
- Delete the empty G-sz folder.
- Create a "G-sz" (mbox) file.
- Launch Thunderbird.
Under Local Folders account, you should see a G-sz folder containing your messages and folders for that old account. Repeat the above steps for the other folders. That should fix the duplication issue and everything else. You can then go ahead and remove the old accounts from Thunderbird, choosing to delete their message data as well, to further clean up after them now that their original data resides under Local Folders.
Stans said
To get rid of the duplication problem, quit Thunderbird, then move everything from the non-sbd folder to the sbd folder. Delete the now empty non-sbd and replace it with an mbox file of the same name using TOUCH.
Sweet, that worked!
Stans said
You can then go ahead and remove the old accounts from Thunderbird, choosing to delete their message data as well, to further clean up after them now that their original data resides under Local Folders.
Yep, got rid of those.
Thank you, Stans.