I've copied a large directory to another location (through a network). I needed to preserve all the timestamps (especially ctime and mtime). However somewhere in the process I screwed things up. (I probably made a typo in the flags.) And all the files have new timestamps now. I still got the directory with the correct timestamps. But I don't want to copy it all again because it took me days. Can I somehow just sync the filestamps, e.g. with rsync? Note that this has to be done through a ssh tunnel over a network that is rather slow. The PCs on both ends however are quite fast.
rsync is your best bet. Something like this should work:
rsync -vr --size-only --times <source> <dest>
rsync not to copy the files again,
--times tells it to update timestamps.