Setting up backup of photos to Flickr using iphoto-flickr

Update: Photos and better options

Apple's new Photos app replaces iPhoto, and the script I describe on this page does not work with Photos. However, I discovered the new Flickr uploadr - a complete replacement wrapped in nice graphical pointy-clicky goodness and vastly simpler to set up. Go have a look, and expect a lengthy initial scan before actual uploading starts.

Update: Did it break for you?

Did you come here because you followed these instructions before July 1st 2014 and things have now stopped working? You need to update the script to the latest version so that it uses SSL. Download it again replacing your old version. Or, if you want to hack, add FlickRaw.secure = true as line 73. The devil is in the details …

Back to the article

A while ago I discovered iphoto-flickr, which is a small script to back the entire contents of iPhoto up to Flickr. Flickr is a long-lived photo service and web site which recently started offering one terabyte of storage for free, making comlete photo backups a rather tempting idea. I found the script, got it running on my computer and went on to tip people off about it when I appeared on the Appsnack podcast. A listener then asked if I could elaborate a bit on actually getting the thing running, so here goes. Some familiarity with the command line (Terminal app) is expected.

A warning about automation - there be dragons

If you plan to run iphoto-flickr automatically using some kind of scheduled task, you may want to read my notes on that below before starting to follow the instructions. In short, I do not think I have the neatest (or even a whole) general solution for automatic running of the script. I will write about what I did in this area, but it is not a complete story or guide.

Getting the script and running backups

Victory!

Of course, it's not a good backup if you need to rememeber to run it yourself. The trick is to make your computer do it for you. There are many ways to do this, and any solution which works for you is by definition good. What follows is my story about what I did to solve this. I half assume that I have missed important points below, and I am sure that there are cleaner ways of accomplishing this. Consider the following more of a story, inspiration or a collection of thoughts than a step by step guide.

The automation story

I decided to use launchd to set up the script to be run regularly. That is kind of the geeky low-level way to go. Any scripting or timing solution which works for you and happens without intervention is by definition good. I messed around a great deal to get this working, probably did things in non-recommended ways and did not take notes as I was doing it. I would love to hear from people who know of better ways to get things done.

My launchd plist file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.bjoreman.flickrbackup.backup</string>
    <key>ProgramArguments</key>
    <array>
        <string>flickrbackup.rb</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Hour</key>
        <integer>10</integer>
        <key>Minute</key>
        <integer>0</integer>
    </dict>
    <key>StandardErrorPath</key>
    <string>/tmp/flickrbackup.err</string>
    <key>StandardOutPath</key>
    <string>/tmp/flickrbackup.out</string>
</dict>
</plist>