Tuesday, November 18, 2014

Syncing Golden Cheetah Across Multiple Computers Using Dropbox




As far as power analysis tools go, Golden Cheetah is the ultimate bike geek's tool.  It is robust, powerful, embodies some of the most useful tools available for training with power, and best of all, it's open source and free to use.

However, unlike say Training Peaks, Golden Cheetah (GC) data does not reside in the cloud. At this point (GC version 3.1), the database data for all your workouts resides in a single directory on your computer.  It's quite easy to port the database from one computer to another, say when migrating to a newer machine, just by transferring the directory which holds your workout data to the new machine.  But there is no way at this point to natively sync the data across multiple machines.

In my case, which I'm sure would be like that of many others, I have a desktop PC where I have diligently loaded all my workouts for analysis in GC.  I would like to be able to access this data while on the road on my laptop PC.  But in addition to this, I would also like to be able to edit the database (i.e. add new workouts) while on the road using my laptop, and have those workouts uploaded to a cloud database so I can view them in GC on my work PC when I get back from a trip.

There are other methods of doing this, namely involving symbolic links, as described here and here. Another way is to install the program on a USB stick.  However, the advantage of using the sync option below is that is is robust and potentially safer, in that that the data will remain resident and synced on all machines running GC.

So here's how to do it.  You'll need:

  • Two or more computers and the same version of GC running on each of those computers (current version is V3.1)
  • A Dropbox Account
  • A nifty program called Dropbox Folder Sync.  This allows you to use Windows Explorer to find any directory on your computer and Sync it to Dropbox.  Dropbox doesn't let you do this yet, you have to drag a directory to the Dropbox folder for the sync to happen.  So in essence, this add-on preserves the GC default directory location intact and creates a symbolic link to the Dropbox Directory for you.

Let's call "Computer 1" the original machine with all your workout data.  In my case, it's my desktop.

We'll call "Computer 2" the new machine that you want to access the original database.  You may also use this machine to add new workouts.  So in my case, it's my laptop, and I'll upload workouts to this computer while on the road.

The main trick with this is figuring out where the GC files reside on each machine, which is easy to do actually.

Just open GC on each computer and click on the Help Menu on the menu bar.



Under Help, click on About and you'll see something like this window:


So the GC programmers have kindly told us exactly where the files are located.  In my case, it's at C:/Users/user/AppData/Local/GoldenCheetah/your_name.  If you right click on this item you can copy it to the Clipboard and into Notepad or somewhere so you can refer to it later.  The name will correspond to the name you wrote in GC after you first installed it on your computer.

Then, go to this location on your computer (you may want to change settings in Windows Explorer (I'm using Windows 7) so you can see hidden folders.

Then right click on that directory and Sync it with Dropbox. The "Dropbox Folder Sync > Sync with Dropbox" menu item that will have been added by the Dropbox Folder Sync Add On.



An little arrow will  magically appear on the folder and the files will start to appear in your Dropbox folder.

Now, that the data is synced to Dropbox, we can move it to Computer 2.

In Computer 2, ensure you have the same version of GC running.  To keep things clean, ensure your user name in GC on computer 2 is spelled exactly the same as on Computer 1.  GC will crease a user database directory with the same name as on Computer 1.  If you have previously used a different name or different spelling, use the "Athlete > Open Window > New Athlete" function on the menu bar to create an account with exactly the same name you used on Computer 1.  You can delete the old name (just by deleting the old directory) at a later time.

Using Windows Explorer, find the database directory on Computer 2.  If you're using the same version of Windows, it will be a very similar location to the one you found on Computer 1 (C:/Users/user/AppData/Local/GoldenCheetah/your_name).  Go into that your_name directory, and, very important, ERASE any files there.  This will ensure that the files from Computer 1 are cleanly copied into that location during the sync.

Go back up one level back to the name, and again, right click to access the "Dropbox Folder Sync > Sync with Dropbox" menu item as you did above on Computer 1, and click on it to start the sync.  You'll be asked if you want to MERGE files, to which you'll answer yes.  (This item is critical.  Dropbox allows you to merge files this way, Microsoft's OneDrive does not at this point, so you can't use that as your cloud location for GC files).

The GC database files will now magically appear in the database name folder on Computer 2.

Any changes you make in Golden Cheetah on either computer show now be reflected in the Dropbox folder, and hence in the user database folder on each computer!

Hope this works for you!  Let me know using the comments if it doesn't.