We've moved!

TechKnack.blogspot.com has officially moved to TechKnack.net. You should be redirected in 3-5 seconds. Thank you.

December 29, 2007

Backing up Thunderbird or Firefox profiles

Add this post to Del.icio.us. Del.icio.us (0 saved)

The mantra of the Linux world is "Always backup important data!!!" This is usually instructed directly before installing Linux onto a system, or otherwise doing anything that could even remotely corrupt anything. Better to be safe than sorry.

Backing up a Thunderbird or Firefox profile is important, too. Especially if you're like me, and it would take hours to get Firefox just perfect again after having your profile wiped (if, for example, the drive it was sitting on were to fall to minor corruption). Hunting down that perfect theme (what was it called again?), rounding up all those can't-live-without extensions...

Under Windows

Under Windows XP (and presumably Vista as well), the default profile for Firefox is found under C:\Documents and Settings\<user>\Application Data\Mozilla\Firefox\Profiles\XXXXXX.default, where that last XXXXX is a random string of numbers. Thunderbird's profile is located under C:\Documents and Settings\<user>\Application Data\Thunderbird\Profiles\XXXXXX.default. If you've used "firefox -ProfileManager" or "thunderbird -ProfileManager" to change your profiles around, these will be different.

Under X/K/Ubuntu

Under Kubuntu (and presumably most or all flavors of linux), Firefox's default profile is under ~/.mozilla/firefox/XXXXXX.Default User. For Thunderbird, it's ~/.mozilla-thunderbird/XXXXXXX.Default User.

Methods of backup

A quick google search can turn up lots of methods of backup, including MozBackup. While I haven't used this extension myself, I've no doubt that it works to some extent (or else it wouldn't have lasted as long as it has). If you prefer GUI solutions, by all means, try it out.

My preferred method, however, is to make a .7z archive of my profile directory (make sure TBird or FireFox is shut down before you zip the archive, though!) This essentially takes a snapshot of the program (including extensions, skins, even open tabs and windows if the "Show my windows and tabs from last time" option is set!); if your profile ever gets corrupted, you can simply unzip the "saved profile" over the current profile, restoring it to the "last known good configuration", to quote windows.

Another advantage to the zip-it-up method is that you can create "holes" in the profile. For example, with the "Show my windows and tabs from last time" option set, Firefox will leave a sessionstore.js file inside the profile directory; the next time Firefox opens, it reads this file and re-opens all your tabs from last session. Deleting this file from the zip archive creates a profile hole that the more up-to-date sessionstore.js can fit into. Very handy at times.

No comments: