Basically what Jarred said, but the condition for this is that you have to use the same computer for this that you used for syncing the 3GS. What the above method does is it copies a list of all of the files and apps on the phone (and personalized stuff like save files or preferences) to the computer, NOT the actual apps and files.
TL;DR Do this on the computer you usually use for iTunes, not a new computer.