If you want export your route from MyTracks app, read them and insert them on postgreSQL database, this can help you :)
After install MyTracks app, a powerful application to keep track of your route while you go around and also add some markers on map. You can export your route into a CSV File.
This code read the CSV File, applies a filter on markers, that when a marker in the CSV file is close enough to a marker in the database, based on the radius parameter, it will not be added to the database. After filtering, insert the data into your postgreSQL database.