Back up profile information in Firefox and Thunderbird

Q I'd like to back up my bookmarks, account settings and address book from Firefox and Thunderbird. I used them for a while in Windows, where I had a dedicated backup program - very useful when Windows threw a wobbly. But in Fedora I can't find either profile. The paths suggested on the Mozilla website don't seem to point at anything resembling either my personal bookmarks (although I did find the Red Hat bookmarks) or my mail files. Searching the filesystem doesn't turn up anything either. Evidently I'm not asking the system the right questions...

A Firefox stores its settings in ~/.mozilla/firefox/default.???, where ??? is an apparently random string. Thunderbird uses ~/.thunderbird/default.???. For example, my bookmarks, settings and address book are stored, respectively, in

~/.mozilla/firefox/default.yyh/bookmarks.html.
~/.thunderbird/default.piz/prefs.js.
~/.thunderbird/default.piz/abook.mab.

It is probably easiest to back up the entire directories with something like

tar czf FFandTBsettings.tar.gz ~/.mozilla/firefox ~/.thunderbird

You could use Cron to make automatic daily backups by saving this script in /etc/cron.daily/mozbackup:

#!/bin/sh
tar czf /somewhere/safe/
FFandTBsettings-$(date -I).tar.gz
home/john/.mozilla/firefox home/
john/.thunderbird

Don't forget to set the executable bit or it will not run:

chmod +x /etc/cron.daily/mozbackup

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar