Thanks to everyone for the further comments, good to hear that it seems I am unusual in having corrupt files.
Time Machine is, as Liviu says, a Mac solution and I share with Ubuntu and occasionally Windows. Dropbox will retain files indefinitely, for an extra fee, but I didn't know that SiderOak did it for their standard fee. Certainly it looks as if I need to improve my backup procedures in some way, but these few files with Lyx are the only times I have had this problem. Graham