I have an ipod touch on OS 3.1.2 jailbroken with blackra1n and i want to upgrade to OS 4.0 and have an untethered jailbreak so I think I should use "jailbreakme".

Does anybody know if I need to restore my ipod first, will I lose all my stuff if i do, can I get it back? My friend recommended I do a restore to factory settings before, but I dont want to lose all my stuff. does itunes back up by jailbroken apps and data? thankyou!