Getting my photos in check

I’ve been using iCloud for my photos now for a while. It’s been OK but it’s always bothered me that I don’t have the pictures locally. Also I had couple of old HDs with pictures that weren’t in uploaded to the iCloud. I also have a pretty good NAS which has been out of use for some time. So a plan formed in my head

  1. Merge all of my pictures
  2. Sort them in a nice folder structure
  3. Store them to my NAS
  4. Upload them to some cloud service

NAS comes into play

My NAS is Synology DS213j with 2 x 2TB RAID configuration. Fortunately it supports ssh and a wide range of programming languages. My first step was to merge all of my pictures so I started by downloading my iCloud library to my Macbook Air. It took quite a while and the export from apple photos to the NAS took even more time. Think days instead of hours.

So finally I had my iCloud library exported to my NAS and all other photo sources as well. What I needed now is a tool to merge all of my pictures without making duplicates and a nice folder structure would be a plus. After some research + trial and error I ended up at

And I can tell you that little python script was a god send. It had all the features and configurability I needed. Basically what I planned was that I run it through all of my picture locations with the same parameters and it would take care that I wouldn’t end up with a bunch duplicate photos and that I got my pictures organized into folders. First though I needed to do some cleaning. Synology indexing had created a bunch of thumbnail directories and to get rid of them I basically run a one line find xargs command like this.

find . -type d -name "@eaDir" -print0 | xargs -0 rm -rf

Now the directories that had been indexed by the NAS were clear of thumbnails I didn’t need.

So now I could go on with the merge. Basically I just run

python /Users/Me/MessyDirectory /Users/Me/Pictures -r --sort %Y-%m-%d --rename %Y_%m_%d_%H_%M

for all my directories and ended up with a nice folder structure containing all of my photos and no duplicates. I was very pleased.

For my next trick, Cloud storage

For cloud storage I decided to go with google photos. I had some experience with it and I liked how the service had evolved.

First thought was to sync the photos using my desktop gaming PC and google photos backup. But then I noticed that google drive had an Google photos directory. After initial testing I saw that pictures in the google drive photo folder were synced to google photos as well. Great. And it was extra great since synology NASes have cloud sync.

It enables the NAS to sync it’s storage with the cloud and since google drive is supported it seemed the perfect solution.

I setup the cloud sync to a new directory in the NAS and selected only Google photos folder for bidirectional syncing. So now I had a empty google photos directory in my NAS (I needed a little empty touch file magic to get it to appear since it was completely empty…just upload one photo to drive’s google photos directory that’s it.). Then it was just a case of moving the photos

mv /Users/Me/Pictures/* /Users/Me/sync/Google Photos/

And that’s all she wrote. As I’m writing this the NAS is still uploading my photos (all 80 GB of them).

So what have I accomplished

  1. Now my iPhone photos will be backed up to google photos through Google photos app and then downloaded to my NAS via the cloud sync. Plus I save a lot of space on my phone.
  2. All my camera photos which I will import to my NAS’s sync directory will be uploaded to Google drive -> Google photos

So basically I have just what I wanted. A local storage with RAID and a cloud backup + access to all of my photos from the internet. This really is a quite a step up from the iCloud mess. I don’t mean to say that iCloud is bad it’s just unclear and I don’t like the fact that I don’t have local copies + the tie up to apple’s photos app library structure is bad.

At the end of the day it took a lot of time (processing 80GB of images with NAS CPU is not fast) but

I have never been happier with my photos situation than I am now

I hope this blog inspires and helps others to organize and backup their photos as well.