Another Apple curiosity, this time related to Photos Libraries backup.
Apple’s advice on backing up Photos Libraries is to either use Time Machine, or make a manual copy of the library to external storage.
At present, only the latter will actually replicate your library in full. When Time Machine backs up a Photos Library, it completely
omits the database folder within it, where all its vital metadata are stored.
Apple has apparently been informed of this problem, but hasn’t got round either to addressing it, or to warning users that their Time Machine
backup will loose their metadata when restored.
This is a strange behaviour on the part of Photos and Time Machine. Manually copying Photos Libraries works around this issue perfectly well.
It happens because the database folder inside a Photos Library has an extended attribute of type com.apple.metadata:com_apple_backup_excludeItem
which prevents it from being backed up by Time Machine.
Source: Oakley & Maxwell