Sync your 3GS right before you go over to the 4. Then when you activate your iPhone 4, it will ask if you want to restore from backup. I have done this many time. I'm am currently using the iOS 4 GM on my 4th 3GS (the first 3 were replaced under AppleCare for various defects), and I'm still running off a backup that started with my 2G running OS 1.14.