Several users have reported an issue in which the iPhone and iPod touch become indefinitely stuck on the backup phase of the iOS 4.0 Update. Other users report that the backup process is inordinately slow after the update, taking up to 3 hours in some cases.
Disable network connection. In some cases, simply disabling your network connection (turning off AirPort or unplugging your Ethernet cable) will resolve the slow or stuck backup phase. It appears that iTunes performs some data network data transfer during the backup process which can, for unknown reasons, take an extremely long time or become stalled.
Restore instead of update. Backup your iPhone or iPod touch, then perform a restore process instead of using the check for update function. This may allow the iPhone or iPod touch to successfully receive the iOS 4.0 update, after which sync processes should occur at normal speed.
Switch USB ports. Try switching your iPhone or iPod touch to a different USB port. In particular, if you are using a hub or other intermediary device, try connecting the device directly to your computer.