Tuesday, November 29, 2005

Recovering Firefox from a Crash

As if there hasn't been enough crashing around here lately...

Let me elaborate on my title: Firefox didn't crash, but Windows did crash, and corrupted Firefox (which was running at the time) in the process.

Last night, Windows XP gave me one of those rare blue screens of death - the ones with the nice STOP: error. (Stop laughing - I'm actually serious about the "rare" part. There are people out there who are so new to computers that they don't even know what a BSOD is - mainly because XP doesn't blue-screen as often as its predecessors did).

Anyway, it was a totally random event, and with it, I decided to just shut down the machine and go to bed. When I woke up today and booted up, after browsing around a bit with my favorite browser (Mozilla Firefox), I noticed something: my bookmarks were missing!

Then... the quick search box had no search engines in it.

And all of my saved passwords were gone.


I made the usual attempts to reinstall the browser and such, to no avail. Here's how I finally got everything back.

1. Back up your existing Profiles folder. It's probably toast, but if you're lucky, you'll be able to use bits of it to restore your important data. FYI: You should be backing up this folder regularly if you ever expect to need to recover from a hard drive or operating system crash.

Your Profiles folder on XP is typically located at:
C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\

Check here if you need to find it on another OS or version of Windows.

2. Start up Firefox's Profile Manager. You can do this in XP by bringing up a command prompt (Start - Run - cmd) and typing:
firefox.exe -profilemanager

3. Create a new profile.

4. Open up Firefox with that new profile and make sure things like the quick search box is working. If so, continue on. If not, uninstall Firefox and install it clean again, then start from step 2.

5. Recover your busted stuff.

Your bookmarks are saved in a file called "bookmarks.html." If you're unlucky like I was, your bookmarks file may have been corrupted when your system crashed. But, if you are lucky like I was, Firefox was kind enough to do daily backups of your bookmarks. (This may be a feature of the new version 1.5, so if you're still using the public 1.0.x versions, you might not have this luxury). My Profiles folder had a subfolder called "bookmarkbackups" that included files such as, bookmarks-2005-11-28.html (labelled by date). Through Firefox's top menu, under Bookmarks - Manage Bookmarks, follow the Import wizard and import the most recent bookmarks file you can find.

Your stored passwords are saved in two files. First, you need the "signons.txt" file, which contains your passwords in an encrypted format. Then, you need the "key3.db" file. Make sure Firefox is shut down, then copy both files from your backup Profiles folder to your new one.

That should bring your busted stuff back to life.

For future reference... just remember to back up your Profiles folder regularly! Then, you'll always be able to restore your important Firefox data. There's also a nice little Firefox extension you can use to automatically backup your bookmarks.

No comments: