anyone know how to back up my 3.1.2 so if i have to restore, i can
restore 3.1.2 and no the new upgrade? my phone is jb
When you make a backup of your iPhone in iTunes, it saves copies of all of your application preferences files (in /var/mobile/Applications/{GUID}/ApplicationName.app/Library/Preferences) as well as your global system preferences from /var/mobile/Library/Preferences. Knowing this (or perhaps just because it seems like the right place to put things), many jailbreak app developers have elected to put settings data for their apps in /var/mobile/Library/Preferences, too.
What this means for you is that when you back up your iPhone in iTunes, most of the preferences for your jailbreak apps are actually getting included in your iTunes backup. Not 100% (some apps do it differently), but a good majority.
Now, just as App Store apps are not themselves included in a backup, neither are the actual jailbreak applications themselves. To restore your phone to the way it was before, first you have to restore from backup, and after that you re-sync your media and apps. Similarly, there is no (easy) way to back up the actual jailbreak apps. You will have to re-install them all through Cydia. Once reinstalled, though, you will hopefully find that most of them retained all of their settings, since those settings were backed up by iTunes and included in the restore.
There is a way to shortcut the reinstallation of all of your jailbreak apps, though. It's called AptBackup. It's a program (installable through Cydia) that generates a list of all of your currently-installed Cydia applications. It places that list in Library/Preferences so that it is backed up along with everything else by iTunes. When you restore your phone from backup, that list is restored as well. Once you have restored your phone, you can go into Cydia, install AptBackup (and only AptBackup), run it and hit the "restore" button, and AptBackup will go through the list of applications for you that it generated previously and automatically download and install them all for you again. So you don't have to remember what all you had installed before and then install them all again one by one. AptBackup will just do it for you.
The end result is that, for example, if you had WinterBoard installed and a bunch of different themes along with it, and you had certain themes selected in WinterBoard but not others, all of that will end up exactly the way it was before: WinterBoard and the different themes will all be listed in the AptBackup list, and so will all be redownloaded and installed by AptBackup again. WinterBoard's configuration was kept intact by iTunes itself in the iPhone backup, and so the same themes that were enabled before will be active again after AptBackup is through restoring all of your Cydia software.
Note that this will only ensure that your jailbreak applications and most of their preferences are restored. If you did any sort of personal customization (you went in and edited the files in certain WinterBoard themes), or have jailbreak apps that keep data themselves (for example, MxTube video downloads), none of those things will be preserved. You will have to manually make backups of that stuff yourself, so you'll have to know where those things are stored (for example, MxTube keeps its own subdirectory under /var/mobile/Media, and also keeps the database of all of the videos that it has stored in there under /var/mobile/Library/MxTube) and make copies of them before you wipe the phone, and then put the files back in place manually after an iTunes restore and AptBackup restore.