Windows User : C >> Users >> User Name >> AppData >> Roaming >> Apple >> Computer >> MobileSync >> Backup >>
Mac OS X User : ~/Libary » Applications Support » MobileSync » Backup.
In the backup folder there will be X number of folders according to number of phones you synced to your iTunes. For example i have two iPhone 2G and 3G so i have two folders named with 40 random hex characters. But i need to copy SMS from iPhone 3G so how do i identify?
To identify your particular iPhone backup sync both phones with 5 minutes of interval and note the time in your computer clock while syncing.
Now Sort the view by date–this will let you easily tell which subfolder belongs to which phone.
Now you knows the folder where your previous iPhone 3G backup is saved, so explore to that particular folder (iPhone 3G) and copy these two files to iPhone 3GS folder. Make sure you must synced new iPhone 3GS at least once so back up folder will be created.
Connect your new iPhone 3GS to the computer and launch the iTunes.
When your iPhone appears under Devices in your iTunes sidebar, Control-click it and select the ‘Restore from Backup…’ option.
Select the backup related to your device i mean iPhone 3GS.