If you restore your iOS (iPhone or iPad) from a backup in iTunes, you’ll find you need to re-enter your usernames and passwords for all your email accounts.
Simply tick the Encrypt iPhone Backups option in the device summary tab in iTunes and enter a password to secure your backups. iTunes will now backup and restore your sensitive data, usernames, passwords and MobileMe data, and do so securely.
From the updated iTunes Terms & Conditions:
Previously iTunes / App Store purchases had no access to your personal data, so this kinda sucks.
Now in iTunes 10 you can play your iPhone music library over the dock connector, handy when visiting friends or playing your personal library on your work computer!
Just click on Music under your iPhone in the Devices sidebar.
When running iPhone OS 4 beta 1, syncing with iTunes doesn’t backup the iPhone causing the error:
Install the iPhone SDK 4 beta with Xcode 3.2.3 (or later), which will update some files in iTunes and enable the backup to complete successfully.
An iTunes update is likely to be released soon to address this and other issues some users are experiencing with syncing.
Update 25/04/10: Apparently iPhone OS 4 beta 2 backs up in iTunes 9.1 without any issues.