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.
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 Apple menu > System Settings, click General in the sidebar, then click Time Machine on the right. (You may need to scroll down.)
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.
Click Restore.
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.
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.