With the system outage at Garmin between July 23rd and July 29th 2020, it became clear that a user is really dependent on the Garmin systems for access to their own data. This made me think about ways to at least have a copy in my own possession.
This page describes how I’m using Peter’s scripting to saveguard my data.
I first wanted to try the script and see what data is retrieved from the Garmin API. To do that, I first installed the script using PIP:
pip3 install garmin-export
After that, I ran the script to look at the files generated:
garmin-export --password <password> <username>
Apparently my watch tracked 161 activities since I started using it in October 31st 2019.
The files generated are described in Garmin export command line tool description.
Looking at the files, the json format looks most accessible, but I’m not sure yet what to do with it.
Although I have no real purpose for the data right now, I have automated backing up the files by creating a cron job:
# m h dom mon dow command 0 0 * * * /home/<user>/.local/bin/garmin-backup \ --backup-dir=/home/<user>/garmin_activities \ --password <password> <username> \ &>> /home/<user>/garmin_activities/backup.log
I choose to have a nightly backup at midnight. Doing it daily will keep it short.
As said, I have no real purpose right now. I might put some effort in importing the data into a database, so I can use for example Grafana to visualize it. And then, having it in a database, it would allow me to do some more analysis on e.g. my heart-rate statistics.
August 5, 2020