quick question: where should i put the backup.sh? can i run it from anywhere?
– fredDec 18 '11 at 19:38

you can copy the script in the /usr/sbin or create a folder in your home folder and modify the .profile to look for executable files in this folder like then add this code to the .profile if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi
– Book Of ZeusDec 18 '11 at 19:45

If you are comfortable with copying files and folders you can manually back up your profile. This process can be as simple as copying a single directory to a backup location. Most of the work is in finding where the profile folder is stored.

It's a good idea to first get rid of any unnecessary files to reduce the size of your backup.
Firefox: " Tools -> Options-> Advanced -> Network -> (under Offline Storage or Cached Web Content) -> Clear Now"
Mozilla Suite/SeaMonkey: Edit -> Preferences -> Advanced -> Cache -> Clear Cache, as well as compact your mail.
Thunderbird: Compact your mail.
Completely exit or quit the application. Mozilla Suite and SeaMonkey 1.x users on Windows should also exit Mozilla Quick Launch if its enabled.
Find the "Mozilla" (for Mozilla Suite/SeaMonkey 1.x), "SeaMonkey" (for SeaMonkey 2), "Firefox", or "Thunderbird" folder in the profile folder path that contains the registry.dat file or profiles.ini file and the "Profiles" folder (Windows and Mac) or <profile name> folder (Linux). See Profile folder - Firefox , Profile folder - Thunderbird and Profile folder - SeaMonkey for the location.
Copy the "Mozilla" "SeaMonkey" "Firefox" or "Thunderbird" folder to the backup location. This will back up all profiles in the default location and the "registry.dat" or "profiles.ini" file that keeps track profiles.
If you have created any profiles in a custom location, copy them to the backup location and make a note of the original location.

Mail is stored by default within the profile. If you re-configured Thunderbird, Mozilla Suite or SeaMonkey to store an accounts messages outside of the profile, you need to also copy the "local directory" for that account. Look in Account settings to find the location of each account's local directory.
[edit]
Manually restore the profile

To restore a profile backup:

Close the application whose profile you're going to restore. If you're using Mozilla Suite or SeaMonkey 1.x you should also exit Mozilla Quick Launch if its enabled.
Copy each folder you backed up to the exact same location that it was in when you made the backup