My Firefox bookmarks and history are gone and I can't use the back button; how do I fix this?

Starting with version 3.0, Firefox uses a database to manage bookmarks, history, etc. and this database can be corrupted, resulting in

  • bookmarks being lost
  • history being lost
  • Back and Forward buttons not working

The problem is addressed on the Mozilla support forums.

This simplest fix is ...
  • close all firefox windows
  • open a terminal/console window and remove places database
    • cd ~/.mozilla/firefox/*.default
    • \rm places.sqlite*
If this does not recover your bookmarks, then you will want to recover them from backups, which is a little more complicated ...
  • close all firefox windows
  • open a terminal/console window and remove places database
    • cd ~/.mozilla/firefox/*.default
    • \rm places.sqlite*
  • look at the copies of your places database in the backups
    • ssh ms
    • cd /usr/local/msbackups/home/`whoami`
    • ls -lth */.mozilla/firefox/*.default/places.sqlite
  • copy the most recent version of the largest places.sqlite file to your firefox profile folder; for example
    • cp -p {2009-12-01,~}/.mozilla/firefox/sbjioi3p.default/places.sqlite