iPhone OS 4 requires newer version of iTunes.
If you have iPhone SDK 4 beta 2 installed, iTunes 9.1 will have no problem backing up the iPhone with OS 4.0 beta installed.
iTunes 9.1 definitely does not support iPhone OS 4.0 Folders. If you have folders in your iPhone home-screen, iTunes 9.1 will definitely fail to backup the iPhone. In one test, we’ve successfully performed backup and sync an iPhone 3GS (OS 4.0 Beta 1) with iTunes 9.1 where Folders were not present anywhere on the Home Screen.
According to reports, developers are having backup-problems with iPhone OS 4 and iTunes. iTunes 9.1 displayed a message “backup failed because it was refused by the iPhone.” It is apparent that a newer build of iTunes is required to fully interact with iPhone OS 4. Some Developers also reported that Folders on iPhone home screen were undone right after syncing with iTunes 9.1.
As Apple has done in the past, a special build of iTunes should be made available to developers.