I have a jailbroken iPhone 3GS with 3.1.3 and I want to upgrade it to 3.2.
Is it possible to do so without losing everything?
I don't particularly see why you would lose your data when upgrading… but then I also don't particularly see why you'd prefer to have your 3GS on 3.2x when you could have it on 4.2x just as easily…
Do you sync your iPhone with iTunes and use it to back up? If so, you're unlikely to have a problem. Just go to http://iclarified.com/tutorials/iphone/ and pick the tutorial that's right for your phone's situation.