Back up the Photos library
Even if you use iCloud Photo Library, it’s important that you always back up your library locally using one of the following methods:
Use Time Machine: After you set up Time Machine, it automatically backs up the files on your Mac. If you ever lose the files in your Photos library, you can restore them from the Time Machine backup. For more information about setting up Time Machine, open Time Machine in the Applications folder, then look in the Help menu.
WARNING: If a Photos library is located on an external drive, don’t back up the drive using Time Machine. The permissions for your Photos library may conflict with those for the Time Machine backup.
Manually copy your library to an external storage device: Drag the Photos library (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 these files separately. To make it easier to back up all your image files at once, you can consolidate referenced files into your library. For more information, see Change where Photos stores your files.