Garmin Connect was a nice service when it launched, but then Garmin decided to focus on other things than listening to customers. Lucky for us, Strava launched (see the Strava blog, and maybe also why it’s good – in Norwegian), and is now a free and much better service for both cyclists and others. Here’s how to move all your activities to Strava – if you are able to fiddle a little with Ruby and Perl.
Why should you switch?
See Garmin’s reasons for switching from Garmin Training Center to Garmin Connect, and then remember that Strava is better than Garmin Connect. And that Strava listens to their users (remember the «transition» to Bing maps?), constantly develop new features like the segment explorer, cropping of logs, etc – and has a very nice Strava app (Garmin has one too, but it’s not as good, and not as free).
Getting activities from Garmin Connect
Update! This blog post was published in November 2011. A lot has happened since then. The easiest way now (February 2015) is probably to set up automatic synchronization of Strava, Garmin Connect, Runkeeper, Endomondo, etc with Tapiriik:
The original post continues below (see the comments too):
If Garmin Connect is the only place you have stored your activities, I recommend disconnect.rb, a very nice Ruby script that asks for your username and password, then downloads all TCX files automatically. Here’s what it looks like in action:
After this (and some waiting) you will have lots of .tcx files:
Nice.
If you want to tidy up a little, you can use this script to rename the files to «YYYY-MM-DD-HHMMSS-Sport.tcx» and put them in directories named «YYYY/MM».
Getting activities from Garmin Training Center
If you have (also?) used Garmin Training Center, you can also export from there. I recommend exporting entire years: just select the «2011» folder in GTC, right-click and export. This gives you one gigantic(?) TCX file, that you need to split. I recommend the Perl script at GPSVisualizer (or the web form if you have a lot of free time, but then it’s probably easier to export individual activities from GTC). If you name the Perl script «split.pl», the command to split the big «2011.tcx» file would be:
./split.pl 2011.tcx split/
After this the «split» directory will contain individual .tcx files for all activities in 2011.
Upload to Strava
Very, very easy: Send an email to upload@strava.com with all the TCX files – that’s it.
Comments or tips?
Please add it below, thanks!
Can you say anything about how Strava is compared to Endomondo?
Yes: I think it’s better. Why: /2011/07/30/strava-det-beste-analyse-nerdeverktoyet-for-syklister/
Good job infusing a bit of Rapha-style into your terminal window. Chapeau!
Thanks! Rapha desktop background and semi-transparent Terminal window = success.
I have a problem. I need to export GC activities, but I don’t know Ruby and Gems.
I download and install Ruby for Windows and I try to use Disconnect.rb but probably he requires custom gems.
What can i do to install required gems and use Ruby script?
Either find out how to install gems, etc (see http://docs.rubygems.org/read/chapter/3), or check out http://www.thesjg.com/gcliberate/
See also: http://support.strava.com/discussions/questions/433-how-to-export-full-dataset-from-garmin-connect
I just wanted to give you a quick thanks for all of this. Worked out well for me when I mistakenly uploaded «empty» data for the past year, and lost a large number of rides (60+) on Strava due to that.
Nice! Happy to hear that!
Huge thanks for this article.
I have got to the final stage and have sent a few activities to Strava.
However I have a mixture of runs and rides, which the rename script has identified correctly, however when I upload to Strava they all upload as rides.
Do you know if it is possible to get Strava to recognise the Activity type?
Thanks
There is a feature request for it, and you can vote for it here: https://strava.zendesk.com/entries/21120143-auto-detect-activity-type-from-garmin-file
Thankyou!
I’m new to ruby. After installing the default ruby1.8 packages through Ubuntu (synaptic), I ran:
gem install json
gem install mechanize
gem install choice
gem install highline
All is working perfectly.
Happy to hear that! Thanks for the Ruby tips too.
Tilbaketråkk: Backup af Garmin Connect | mahler | io
http://www.sideburn.org/garmin/
«This will pull all tcx files from your garmin connect account and zip them up for download. Use at you own risk, this is not a secure site!! Then again it’s just a garmin account…. If you’re really hesitant about using your password on this site, I suggest changing your garmin password temporarily for use on this application then changing it back once you have downloaded your rides.»
Thanks for the tip! I agree about changing to a temporary password.
What does «%w{rubygems json fileutils mechanize choice highline/import}.map{|x| require x}»
Exactly mean?
I have downloaded the gems json, fileutils, mechanize choice and both highline and import. They are in the same folder as disconnect.rb.
Is there anything I need to do with .map?
Can someone help me?
Not sure what you are asking, or where you found that code/message/whatnot. I think you need to install the gems properly, not just download them to the same directory as disconnect.rb. See: http://docs.rubygems.org/read/chapter/3
fantastic; i’ve got everything in strava now. thank you,
Nice, congratulations!
It’s a real shame the tcx files exported from Garmin Connect do not contain the names and descriptions that you can give Activities on that site. It appears the tcx file could contain these as the format has space for activity names and Notes attribute. And still to be determined if Strava would import the activity name and the Notes section from the file even if they were there.
Yes, Garmin should include the details on export. I’m not sure if Strava would import the additional data, but that should be easy for test if someone bothers (not me, as I’m done with the moving).
On Windows, OpenSSL has no access to the OS certificate store.. There (apparently) is a way to fix that, but for the purpose of this basic task, a workaround may be used. In ‘disconnect.rb’, change
agent = Mechanize.new
to
agent = Mechanize.new do |a|
a.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
and it runs without verifying the garmin site’s certificate..
Nice, thanks!
Thanks for the script and tutorial it works fantastically
Happy to hear that!
It looks like you can no longer send a bulk upload to Strava with an email. That link no longer works, and I can find no reference on the strava website to such a feature. It appears that they think their bulk upload feature does the trick, but it’s limited to 25 files, so painful to upload a lot of history.
Hmmm, that could mean a lot of work, yes. Thanks for the heads-up.
Thanks a lot for your very valuable hints. I tried to do a bulk download of all my activities from connect.gamin, but I get this error message:
vdO:downloads hvdosten$ ruby disconnect.rb –user=hvdosten –output-dir=garmin
Enter your password: ******
Loaded login page.
disconnect.rb:58:in `block in login’: undefined method `[]=’ for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/mechanize-2.7.3/lib/mechanize.rb:442:in `get’
from disconnect.rb:55:in `login’
from disconnect.rb:103:in `’
vdO:downloads hvdosten$
I would be very happy if there is anybody out there who could give me a hint how to overcome this problem. Thanks a lot in advance!!
Harald