I wish to upgrade and jailbreak my iPhone 3GS currently on the 3.1.3 firmware to 4.01 firmware. I have currently jailbroken my phone on 3.1.3 firmware using spirit. Is there any way I could save my current jailbreak so that in case anything goes wrong when I upgrade to 4.01 I could revert back to my previous jailbreak? Also could someone please recommend me a site that gives step by step guide on how to jailbreak on 4.01 firmware for iPhone 3GS?

Thanks in advance