Restore a library from Time Machine in Photos on Mac
If you back up your Mac with Time Machine, you can easily restore a photo library to its state when the last backup was performed.
Note: If you use iCloud Photos and you restore the System Photo Library from a Time Machine backup, any photos you’ve deleted since the last Time Machine backup are restored to your Mac and uploaded to iCloud again. If you chose to optimise Mac storage, Time Machine may not have a backup of your originals. However, the originals are stored in iCloud.
If the Photos app on your Mac is open, choose Photos > Quit Photos.
Click the Time Machine icon in the menu bar and choose Enter Time Machine, or choose the Apple menu > System Preferences, then click Time Machine .
Time Machine opens and shows your available backups.
Click the date of your last backup, navigate to the backup of your photo library, then click to select it.
Depending on the size of your library it may take some time for your library to be restored. When you next open Photos, you should be able to use your Photos library as it was when last backed up.