Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
So then truely the best way is to

copy your pre-jailbrake backup folder from the MobileSync dir.

DFU restore

Then right click and restore with your clean pre-jailbrake backup from your copy of mobile sync
 
If you have a backup from before the phone was jailbroken, you can restore to that, otherwise you must restore as new.

A backup contains configuration files, some of which are modified or created when jailbreaking and therefore can provide evidence of jailbreaking.

If you want your iDevice "100% unjailbroken" for your own purposes, just restore and use your backup. If you're super scared that Apple is going to check if it's been jailbroken (which they don't, in my experience), you can't restore from a backup made while jailbroken.
 
just save your backup in another location before you jailbreak, then if you want to go back, delete your most current backup and put the old one back in there. You will need to enable hidden folders and search for it, but its there.

This is exactly what I did, but I have not tried it out yet. If I drop the iPhone backup folder back in the same location, will iTunes automatically recognize it? Has anybody got this to work on OSX?

My goal is to have a pre-jailbroken backup available in case something goes wrong. I knew iTunes would keep overwriting my latest backup, so I copied the backup to another folder before I jailbroke. I have since backed up while jailbroken, so I hope I can find a way to use my saved backup if I need to.
 
If I'm on 3.1.2 and have the blackra1n jailbreak and I want to restore so I click the restore button but then it says I have to restore and update and I'm afraid that when it updates my phone will brick, is this true or what should I do? Thanks.
 
If I'm on 3.1.2 and have the blackra1n jailbreak and I want to restore so I click the restore button but then it says I have to restore and update and I'm afraid that when it updates my phone will brick, is this true or what should I do? Thanks.

A restore will update your software to IOS 4.0.1 It will not brick. If that is not what you want to achieve then perhaps you can provide more information.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.