MozillaZine

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 Move to a new PC or Moving your profile folder - Thunderbird if your profile is okay and you just want to move it.

See Importing folders and Moving address books between profiles if you just want to move your folders and address books to a new profile. You don't need to read the rest of this article unless there is something else you want to move too.

Contents

Preparation

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.

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.

Account settings

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.

Add-ons

  • extensions directory - Themes and Extensions.

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.

Address books

  • abook.mab and history.mab - Personal and Collected Addresses address books.

If you have any other address books, Thunderbird will ignore them if you just copy them. See this article for how to migrate them.

Cookies

Thunderbird disables cookies by default. If you have any, they might be for the webmail extension.

Dictionaries

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.

Mail

  • Mail directory - POP accounts
  • Local Folders directory - Global inbox and/or locally stored messages. It's in the Mail directory.
  • ImapMail directory - IMAP accounts
  • popstate.dat (in each POP account directory) - Keeps track of which messages have been downloaded from the POP server.
  • msgFilterRules.dat (in each account directory) - Message filters

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.

Lightning add-on

  • cookies.sqlite - Lightning's cookies are stored separately
  • permissions.sqlite - Permissions
  • storage.sdb - Calendar data

News

  • News directory - Newsgroups messages and settings.
  • hostinfo.dat in News directory - Lists all the newsgroups available for the current server
  • msgFilterRules.dat - Message filters for the newsgroups
  • *.rc in News - subscribed newsgroups

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.

Saved passwords

  • key3.db - Key database for passwords. The two other files require it.
  • signons.txt Saved passwords.
  • cert8.db Security certificates used by SSL etc.

Normally you would copy all three of these files or none of them.

Tags

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.

User styles

These optional files change the way Thunderbird, messages and web pages look.

See Also