You are here

Firefox losing bookmarks

Printer-friendly versionPrinter-friendly version

On DICE desktops, the Firefox web browser can periodically lose its bookmarks.

In most cases it seems to be related to leaving Firefox running over night, and then your AFS tokens expiring. The only way to make sure this doesn't happen is to remember to close Firefox each night.

If you have lost your bookmarks, or they've been corrupted, then this document hopes to give you some tips on how you may be able to recover them.

Be prepared

Assuming you have a working Firefox and set of bookmarks, there are two things you should do before problems arise. Basically you will be creating a snapshot copy of your bookmarks and settings. First, export a copy of your bookmarks:

  • Open up the bookmark manager (CTRL-SHIFT-O is the keyboard shortcut).
  • From the "Import and Backup" menu at the top of the manager, select "Backup"
  • Save the resulting .json file somewhere in your home directory, so that you'll then be able to find it later if necessary.

The second thing you can do is save a copy of your whole Firefox profile. To do this:

  • First make sure you quit Firefox, and that it is no longer running on any machine.
  • Change directory to where Firefox stores its configuration:
    cd ~/.mozilla/firefox
  • Assuming you are only using one Firefox profile, then in this directory you should have one sub-directory called something like 29iyzdfd.Default. The leading characters will vary, but it will end in .Default. This is the directory you want to make a copy of. (If you have multiple profiles, then they will end in ".whatever_you_called_the_profile")
  • Make a copy of your ".Default" directory, e.g.
    cp -a 29iyzdfd.Default 29iyzdfd.Default.backup
  • You can now restart firefox.

Both of the above things you should do on a regular basis, or whenever you think your bookmarks or settings have changed considerably since the last time you did them. If you ever need to use these files (see later) then your bookmarks and/or settings will revert back to when you last took these copies.

If you do lose your bookmarks

If you do lose your bookmarks, or they seem somehow broken, then first try firefox's own backups of your bookmarks:

  • Open your bookmark manager (as above, CTRL-SHIFT-O is the shortcut)
  • From the "Import and Backup" menu in the manager, follow the "Restore" sub-menu
  • From the list of automatic backups, pick a date to restore from and see if that is successful.
  • If the first date you try doesn't work, try picking an older one.
  • If you are successful, quit and restart firefox to make sure the change sticks.

If none of these automatic backups successfully restore, then:

  • As above, open your bookmark manager, and click on the "Import and Backup" menu again.
  • This time from the "Restore" sub-menu, select the "Choose File..." option.
  • Now browse to the .json file that you'd previously saved in the first Be prepared section above, and restore from that file.

If this also fails, or gives some error, then your Firefox profile has become corrupt. In this case you will need to restore your profile to a previous working state. This is the second thing you saved from the Be prepared section above.

  • First, quit any running Firefox you may have, then:
    cd ~/.mozilla/firefox
  • Move your broken ".Default" folder to one side, e.g.
    mv -i 29iyzdfd.Default 29iyzdfd.Default.broken
  • Now copy your previously saved profile in its place, e.g.
    cp -a 29iyzdfd.Default.backup 29iyzdfd.Default
  • Restart Firefox, and you should find your profile as it was back when you made the copy.

If none of the above works, then you may have to delete your existing Firefox profile and start again!

Last reviewed: 

System Status

Home dirs (AFS)
Other services
University services
Scheduled downtime

Choose a topic