Skip to content

Backing up my flickr photos and metadata

March 14, 2010

I’ve been trying to backup my flickr account for long time and haven’t (until now) found a good solution. I want to backup not only the original photos but the titles, descriptions, comments, geotags, etc. There are several programs that will run MacOSX / Linux for backing up just the photo files, but most (or all) of these don’t backup metadata or else they are really difficult to get running under OSX.

Today I found, a python script that uses the python flickrapi module and libxml2 to do exactly what I want. Getting all this to work on Mac OSX 10.6 (Snow Leopard) took some searching and compiling so I wanted to record what I did here.


  1. Download and libxml2 source, put them in directory [DIR] (I downloaded
  2. Compile libxml2: untar the libxml archive and enter it’s directory:

    tar xvzf libxml2-2.7.6.tar.gz; cd libxml2-2.7.6
    and compile:

    ./configure; make; sudo make install

  3. Before you run you’ll have to make sure Python knows where to find the libxml2 module. Mine got installed in /usr/local/lib/python2.6/site-packages so I put this directory in my python path:

    export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.6/site-packages

  4. Go back to [DIR]: cd ..
  5. Before running you may need to make a modification. I had to do this to avoid getting the error:

    UnboundLocalError: local variable 'isPrivateFailure' referenced before assignment
    What I did (following this Google code issue) is modify line 390, by inserting the line:

        isPrivateFailure = False

    make sure the line is properly indented so that Python doesn’t complain.

  6. Now we’re ready to rock and roll. Find your flickr ID (e.g. mine is 97495157@N00) and run:

    mkdir BACKUP
    ./ -i 97495157@N00 -d BACKUP -p

    See the page above for more commandline options.

Now I have a nice DVD backup of my 2250 flickr photos, complete with metadata! Awesome.

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: