Upgrading Your iPhone
So you've replaced your iPhone or iPad. Maybe you upgraded to a shiny new one, or something else. Here's how you can keep your data.
Migrate All Data Automatically *Recommended*
Use iTunes to backup your old iPhone (plug it in, and in iTunes, right click your iPhone -> Backup). This ensures the data you migrate is current.
Second Step (Recommended)
Make a copy of your iTunes Backup Directory. ZIP it up, or copy it somewhere. If you do this, then your data is safe, even if something goes wrong.
When you plug in your new iPhone, iTunes will ask you if you want to use a backup from your old iPhone to setup the new iPhone. Choose YES. This should restore all data from your old iPhone onto the new one (NB. you don't actually need your old iPhone to do this, just the computer it syncs with).
NB. you may have to sync all your Apps onto this new phone before you can actually see the data. Do the Restore first, then sync the Apps via iTunes. If it doesn't work, you can always try restoring it again.
For safety, wait until you have verified all your data is on the new iPhone, before deleting or syncing the old iPhone.
Manually Copy GPS Log Data
These instructions are for advanced users.
If you did not do the automatic migration (above) or have some other issue, you can migrate the GPS Log data manually.
It is possible to use the GPS Log FTP Utility, with FTP software on your Mac or PC to migrate just the the GPS Log data. You can download this data from your old iPhone, and upload on to the new iPhone using the GPS Log FTP Utility. Using this approach, download ALL data from GPS Log from your old iPhone and upload it ALL to your new iPhone.
If you do not have your old iPhone anymore, you can also use this tool to restore GPS Log data that you extract from the backup. Note that relying on iTunes alone for backups is unwise.