This information is also available elsewhere, most prominently on the Apple Support site, but it is not something you necessarily go looking for until after you've got yourself into a bit of a muddle.

Upgrading or replacing your iPhone in iTunes is not as utterly obvious as Apple product generally is. And that is the problem, we are so used to things simply working or doing that the iPhone upgrade/replace process can be difficult as it requires a bit of thought.

Firstly, here is Apple's official take on the matter http://support.apple.com/kb/HT2109

Now that is all very well, until you are faced with upgrading/replacing an iPhone that had a higher version of the firmware than the new device you are trying to add in its place. In this case iTunes tells you that it cannot restore a backup from a higher (later) version of the firmware. What to do now?

My situation was this:
  • iPhone 3G with 2.0.2 firmware previously synched and backed up in iTunes
  • Replacement iPhone 3G with 2.0.1 firmware
When I initially attached the new iPhone 3G I intuitively followed the official Apple steps (without knowing it) and attempted to restore from a previous backup. But when I selected the backup that I had made with the previous iPhone 3G I iTunes responded with the message that the attached iPhone could not be restored to because the backup was done with a later version of the firmware.

All that I could think to do was to try again, but this time create a new iPhone in iTunes, which I did. Then I performed a firmware upgrade to 2.0.2, and finally I performed a restore to get back my previous backup - which worked.

The key thing is to ensure that you make a backup of your previous iPhone before attempting to do any kind of upgrade or replacement. Apple's words on iPhone Backups are here --> http://support.apple.com/kb/HT1766