MozillaZine

Recovering a profile that suddenly disappeared

From MozillaZine Knowledge Base

This article was written for Thunderbird but also applies to the Mozilla Suite. For Firefox, see the article Recovering a missing profile

Contents

Which problem do you have?

Thunderbird has a nasty habit of once in a great while forgetting about the existence of a profile if it uses the default name. When this occurs you suddenly start up in the new account wizard and it looks like you lost everything. You haven't. Its just lost track of your profile, which is probably intact.

Another possibility is that your prefs.js file is empty or corrupt due to either Windows or Thunderbird crashing. Your prefs.js file has all of your account information and settings. In this case you haven't lost any of your mail or address books, but Thunderbird no longer knows how to fetch new mail or send messages, or display the folders in the folder pane. You'd need to recreate the accounts in Thunderbird.

A quick way to tell which problem you're suffering from is to look at your personal address book within Thunderbird. If it looks okay go here.

If Thunderbird didn't run the new account wizard when it started up see Disappearing mail if some or all of your messages aren't visible in Thunderbird or Empty folders if some of your folders are empty.

Lost profile

1. Follow the instructions on how to move a profile. This will tell Thunderbird again where your profile is stored.

2. Use the profile manager to change the name of your profile to a unique name to prevent this problem from occurring again.

If this doesn't work:

  • Did you try more than one of the methods to move a profile?
  • Thunderbird looks in the profiles.ini file to find what profiles you have and where they are. It won't ignore bad entries in that file. If you have only one profile that you care about and you can't recover it delete the profiles.ini file and then follow the instructions on how to move a profile by creating a new profile and copying the contents of the old one over it. Thunderbird will create a new good profiles.ini for you when it creates the new profile. Profiles.ini is stored in the Thunderbird directory above where your profiles are stored by default.
  • See if you can make a backup of the lost profile using Mozbackup. Then use Mozbackup to restore the profile.
  • See if you have both a prefs.js and a prefs-1.js file in your profile. You should only have prefs.js. One user had that problem. The new prefs.js file didn't specify where mail should be stored. They solved the problem by deleting prefs.js and renaming prefs-1.js to prefs.js.

If you run into problems don't spend too much time trying different ways to move your profile. Take a moment and confirm that your profile is still intact, and then consider whether it would be quicker to recover the data from the old profile than to keep trying to move it.

Is your profile intact?

Normally your profile is intact, and it just takes several tries to figure out how to move the profile. However, at some point you may want to do a sanity check that your profile is still intact. The easiest way is to open a console window (DOS box) and use a -profile "path" command line argument per this article to run Thunderbird using your profile. If that works then you know that your profile is okay, you just need to figure out whats causing your problem in moving the profile.

If that doesn't work (or you're not sure whether you made an error in using the command line arguments):

  • Find the profile .
  • Look for a abook.mab file. Thats your personal address book.
  • Look for a prefs.js file. Thats your settings.
  • The "inbox." file is a mbox file used to store the messages for a inbox folder. The Mail subdirectory should have subdirectories named after each accounts mail server, each of which has a "inbox." file. For example, if you use Gmail there should be a "inbox." file at Mail\pop.gmail.com . A 127.0.0.X directory occurs when you use a add-on or extension to support webmail. As a minimum you should have a Mail\Local Folders directory with a "inbox." file even if all of your accounts use a global inbox or you only use IMAP accounts.

If you have your personal address book, your settings, and your inbox folders your profile is probably intact. You can either try to move the profile again, or migrate your data to a new profile per the next section. Its more work (you'll need to create the accounts again, re-install any extensions/themes you had added, and recreate any customizations you had made) but not as difficult.

Recovering data from your old profile

  • Create a new profile using the profile manager . Make certain you pick a unique name so that this problem doesn't occur again.
  • Use the ImportExportTools extension (it used to be called the mboximport extension) to import the folders from your old profile. Your folders are stored as mbox files. They are text files with the folders name and no file extension. For example, your inbox folder is "inbox.". You'll notice other files with the folders name and a .msf file extension. Ignore them, they don't have any messages.
  • Copy your old address books to the new profile.

See Importing folders if you have problems installing the ImportExportTools extension. You probably left clicked on the download URL instead of right clicking and selecting "save link as".

Once things are working, read this article for how to recover the less important files.

Corrupt or empty prefs.js

A "empty" pref.js file typically isn't totally empty. It may have a few lines such as

user_pref("mail.smtpservers", "");
user_pref("mailnews.quotingPrefs.version", 1);
user_pref("mailnews.ui.threadpane.version", 5);
user_pref("prefs.converted-to-utf8", true);

or a couple dozen lines setting lots of unimportant preferences. Whats important is whether it still contains your account information, not how big it is.

Open the prefs.js file with Notepad and search for the string mail.account . Its used in statements such as user_pref("mail.account.account1.server", "server1"); to define an account and in statements such as user_pref("mail.accountmanager.accounts", "account1, account2, account3"); to list what accounts exists. If you can't find any then your prefs.js file is either empty or corrupt.

1. Exit Thunderbird and make a backup copy of the prefs.js file.

2. If you have a backup of your profile replace the "bad" prefs.js file with one from your backup. If you made your backup using Mozbackup you can unzip the "*.pcv" backup file as described here to get the backed up prefs.js file. Normally you won't have a "prefs.bak" file in your profile. However, if you do you could also try using it as the backup copy.

3. If you don't have a backup of prefs.js try running CHKDSK to recover the file. You may be able to recover it in a C:\FOUND.000 directory. If you're using Linux or OSX try using fsck to recover the file.

4. Otherwise you will need to rebuild prefs.js. You can do this by creating the same accounts again in the existing profile and setting Thunderbird to use the local directories that still contain the missing mail, per this article. Another option is to create a new profile using the Profile Manager , create the accounts again, and then migrate your mail , address books, filters and other mail related files from the old profile per this article .

See also

External links