As you can tell, I didn't track the whole trip. The bit in the middle was lost because my GPS (a Garmin Legend) lost its connection and I had fallen asleep :-).
Some useful Ukraine train links:
Schedules for Russian and Ukrainian trains
Our train on the above site
About the Ternopol train station (about 120 km ESE of Lvov)
Official Ukrainian railway site (in Russian and Ukrainian)
A ticket for two people for this trip: