Upgrading and restoring are exactly the same thing. You WILL lose everything upon restoring/upgrading.
HOWEVER - don't fret!
Go to Cydia, right now, and download this package - "APTBACKUP".
Open it. Click "Backup".
Open iTunes. Sync your iPhone and allow iTunes to create a backup while it does that.
Upgrade/restore your software.
Jailbreak using blackra1n.
Install Cydia.
Go to Cydia, download "APTBACKUP" again.
Open it.
Click "Restore".
Let the program do it's thing. It can take UP TO 10 MINUTES. It did not freeze. Just LET IT LOAD.
The phone will re-boot, and you'll have all of your stuff back. Just like magic.