Well, it can be done as aford10 wrote down for u or u can try to save your favorites to a file... and restore it after new version is installed. I use this for periodical settings and favorites and extensions back up too.
U can use for Firefox soft like MozBackup.
MozBackup is a simple utility for creating backups of Mozilla Firefox, Mozilla Thunderbird, Mozilla Sunbird, Flock, SeaMonkey, Mozilla Suite, Spicebird, Songbird and Netscape profiles.
http://mozbackup.jasnapaka.com/