Transferring data to a new profile - Thunderbird
From MozillaZine Knowledge Base
Sometimes when you have problems with Thunderbird and can't figure out what's wrong, it's easier to create a new profile and transfer any data you want to save, rather than keep trying to fix your existing profile. This article is also useful if you want to merge multiple profiles. If you're using Firefox or SeaMonkey, see Transferring data to a new profile - Firefox or Transferring data to a new profile - SeaMonkey.
See Importing folders and Moving address books between profiles if you just want to move your folders and address books to a new profile that you create using the profile manager. You don't need to read the rest of this article unless there is something else you want to move too.
Since you may be copying files over existing files with the same name, its a good idea to first back up your profiles as a precaution. MozBackup is a popular way to do that if you use Windows. Please note that MozBackUp is no longer being updated or supported. So use at your own risk, but there is an updated version in the NEWS section.
You may also want to compact your folders using File -> Compact Folders to avoid copying "deleted" messages that haven't been physically deleted yet (they're just marked for deletion and hidden from view).
Create a new profile
Create a new profile, if you haven't done so already. To do this, completely close Thunderbird by choosing File -> Exit (or Quit). Use the Profile Manager to create a new profile. Make note of the name you give to the new profile so you can distinguish between the old and the new. Then completely close Thunderbird.
Identify what you want to salvage
If you haven't identified what set of files is causing your problem, it's recommended you copy files from your old profile folder to the new one in several steps, testing whether things are still working okay between steps. Since re-entering your account settings can be error prone (and you need accounts to check whether a lot of the functionality is working), it's frequently a good idea to copy them first.
A list of files used to store each type of data is provided below. It's recommended that you only copy data that you either can't recreate (such as messages) or would be a lot of work to recreate (such as address books and account settings) to the new profile. Its frequently quicker to re-install or re-configure something than to spend time debugging what you did wrong. This article assumes you're using Thunderbird 1.5 or later. If you're using a older version, you may need to look at Files and folders in the profile - Thunderbird to see if there are any changes that affect you.
You may need to manually edit the paths in prefs.js to reflect the new profile location. If the new profile doesn't have the same extensions, you may have some unused preferences set by those extensions, but that usually doesn't harm anything.
Delete the extensions.ini, extensions.cache and extensions.rdf files in the directory. They will be regenerated when you start Thunderbird. This avoids potential problems due to old paths.
A few extensions store data in additional files in the profile, usually at the top of the directory. For example, the Lightning extension uses *.sdb files to store calendars. You'll need to move them separately.
If you have any other address books, Thunderbird will ignore them if you just copy them. See this article for how to migrate them.
Thunderbird disables cookies by default. If you have any, they might be for the webmail extension.
Any other optional dictionaries (such as the UK version of the English dictionary) are extensions. Your default dictionary is installed as part of Thunderbird and is not part of your profile.
The simplest way to migrate your mail is to copy Mail and ImapMail (and their sub directories) to the top directory in the new profile, overwriting the existing ones. See Empty folders if it doesn't work.
However, the safest way is to use the ImportExportTools extension to import whatever folders you want to keep. When you run the menu command, it gives you the option of selecting a directory and having it find and select all of the folders in that directory and its subdirectories. See Importing folders for how to install and use that extension.
See this article if you are an advanced user and want to manually move several folders.
You need to copy the popstate.dat file for each POP account to prevent Thunderbird from downloading all of the messages for that server again (assuming they haven't been deleted). If you have any message filters, they're also stored in each account directory. If you copied the Mail directory, then you have already copied those files.
If you stored your attachments in a separate directory, you need to also copy that directory. By default, attachments are stored within the mail folder with the messages (you don't have to do anything).
If you didn't copy the existing account settings, you will need to create new accounts. If you recreate a POP or IMAP account using the same mail server in Tools -> Account Settings -> Server Settings, it should reuse the directories you copied. For example, Gmail uses a pop.gmail.com server, so it will always create a pop.gmail.com subdirectory within the Mail directory to store everything for that account. However, if you have multiple mail accounts with the same mail server, it's going to add a suffix (localhost-1, localhost-2 etc.) to the mail account directory, and you'll need to figure out which directory is used for each account. In that case, it's probably best to avoid this problem by using the ImportExportTools extension.
Less important mail and news files
If you want to migrate these files, save them for last.
If necessary, create a new "newsgroup" account for each news server in the new profile ("File -> New -> Account"), then close Thunderbird and copy over the "News" folder contents.
Normally you would copy all three of these files or none of them.
prefs.js contains the definitions for the tags. Use mailtweak to export and import your tag definitions to your new profile. The actual tags are stored differently, depending whether you use POP or IMAP and depending on the capabilites of the IMAP server. See Tags for more details.
These optional files change the way Thunderbird, messages and web pages look.