Photo Library On Synology Nas

  • So I bought a 4-bay Synology NAS, and I have successfully moved all my Time Machine backups to it, which is explicitly supported by both Apple and Synology. I also wanted to move my Photo Library to it, but officially Apple doesn’t recommend it due to risk of data loss: Apple Support Move your Photos library to save space on your Mac.
  • Call it gphoto-sync and hit create. In order to enable access we need to go to the photo api. Click on the project you just created. In the search box type photos. Pick photos library api. This allows your account to use the photos API. We still need to authorize our app to access that API though.
Synology

I regularly import photos I’ve taken while out and about into my photo library on my Synology NAS so I decided to automate the process using Exiftool and a scheduled task on my Synology NAS.

On the Synology Moments homepage, you can switch between the Photos, Albums and For You tabs to browse photos and videos in different modes. Upload Photos and Videos When uploading photos or videos to Synology Moments via the web interface or mobile devices, the uploaded items will be respectively uploaded to the folder named Web or Mobile.

Photo Library On Synology Nasdaq

Firstly it requires the use of Exiftool, A handy utility that I use to “pull” the Exif data from photos and subsequently rename them using a date based name. To do that you need to install it’s package from a non-official community repository. It runs in PERL which will also install.

The repository in question is https://www.cphub.net/. Adding it is easy, instructions here.

Once you’ve done that, re-launch package manager and exiftool will be available. You may need to enable BETA packages.

Photo Library On Synology Nasal

Now that you have Exiftool you’ll need to make a script that runs on a schedule to do the sorting. Start with a new text file on your computer so you can edit it. All file system references are done from the root level (EG: /volume1/nameofshare).

Library

For the uninitiated the below can look a little overwhelming but it basically takes the following on my NAS:

And processes it to:

Apple Photos Library On Synology Nas

To deconstruct that name it sorts it into a folder of the current year with a subfolder of the month. Then the file is named with week number to keep things chronological when browsing. Then the date and time in a logical format for my region and use. for any more info, read the Exiftool documentation.

I then have a couple of lines that find and move files with extensions that denote video files and other image types that I organise into other folders and a catch-all for everything else at the end. There’s some statements ignoring synology system folders too which are important. You’ll obviously need to edit it to match your use-case.

You can now make this a user defined script scheduled task on your NAS.

Synology

Mac Photo Library On Synology Nas

Hopefully your photos are now organised.