I recently had to restore a Mojave Mac Mini from Time Machine. It all seems to go well until I discovered that the Photos Library was gone. After looking through the TM backup, I see the last time it was backed up was 2018. I did nothing I can imagine to exclude it. It's un-backed-up state is confirmed on a second off-site backup started in Feb of this year; the file simply does not exist.
There are no TM exclusion rules that would have prevented the file from being backed up.
I suppose I'm out of luck on a recent version of the file, but why would this have happened? Unless I'm missing something, this brings into question whether TM is a viable tool for backups.
Update
I decided to take my lumps and restore the old library. 17 GB of data is better than none. I did check the next time TM ran and it happily backed up the library! Note that I did not change any settings.
This gives me great pause in relying on Time Machine for backups. It archives many of the files on my disk, but if it misses even one, that is always going to be the one that you need.
Also of note, this is the only machine I administer that I don't use a belt-and-suspenders approach to backups. All my other machines have at least one TM backup plus a bootable backup with Carbon Copy Cloner. I just ran out of CCC licenses for this machine.