WARNING: If a photo library is located on an external drive, don’t use Time Machine to store a backup on that storage device. The permissions for the library may conflict with those for the Time Machine backup.
Manually copy your library to an external storage device: Drag the photo library (stored by default in the Pictures folder on your Mac) to your storage device to create a copy.
If you have more than one photo library, be sure to back them all up.
Important: If any of your image files are stored outside your photo library, those files (known as referenced files) aren’t backed up when you back up your library. Be sure to back up those files separately. To make it easier to back up all your image files at once, you can consolidate referenced files into your library. See Repair your photo library on Mac