How To:Save All Your Contacts/SMS/Notes/Calendar
To save all your Contacts/SMS/Notes/Calendar, SSH your iPhone or use iPhone browser
Go to location /var/mobile/Library/AddressBook.
You will find two files there AddressBook.sqlitedb & AddressBookImages.sqlitedb(for contact images)
Save these two files to a safe location.
After formatting ur PC or restorin ur phone just go to the above path on ur iPhone and and rename both the orignal files and replace it with the ones which you saved.
You can follow the same process for SMS , Notes , Calendar just backup the sms.db & notes.db files from /var/mobile/Library/SMS , /var/mobile/Library/Notes & /var/mobile/Library/Calendar respectively.