fight a losing battle vs fight a rearguard action

fight a losing battle

verb
  • To continue to wage war when it is clear that one is not going to win. 

  • To try to do something so difficult that it will probably end in failure. 

fight a rearguard action

How often have the words fight a losing battle and fight a rearguard action occurred in a corpus of books? (source: Google Ngram Viewer )