Tags

, , , ,

I tried a variety of Flickr backup solutions to varying degrees of success.  I have a lot of Flickr content (over 12,000 photo and video files) and unfortunately many of the solutions would time out and not complete successfully.  It was difficult to determine if I had a full backup of all my photos, videos and associated metadata.  After trying a variety of prebuilt solutions that didn’t completely meet my needs I decided to find a Flickr API I could use to automate my backups.

I found Sybren A. Stuvel’s flickrapi 1.4.2 to be a solid solution. I had no experience with python and it took a little tweaking to get it to work on my 64-bit Windows 7 machine. I documented the installation steps (for 64-bit Windows 7) below:

1) Install python-2.7.1.msi (non-64 bit) from as an administrator. Before this I tried to install the 64-bit version of python. But I ran into issues and unfortunately this 64-bit Windows 7 python workaround didn’t work for me.

2) Install libxml2-python-2.7.7.win32-py2.7.exe as an administrator.

3) Install latest flickrapi to desired folder. Open command prompt as an administrator and run “python setup.py install”

Steps to back up Flickr

1) Use idGettr to convert Flickr username to Flickr ID. Flickr ID will resemble 11111111@N00. Replace 11111111@N00 below with your Flickr ID.

2) Backup photo set metadata via (command line running as administrator)
python Offlickr.py -i 11111111@N00 -d “e:\temp\flickr set metadata” -v -s

3) Backup photo metadata via (command line running as administrator)
python Offlickr.py -i 11111111@N00 -d “e:\temp\flickr photo metadata” -v

4) Backup photos and photo metadata via (command line running as administrator)
python Offlickr.py -i 11111111@N00 -d “e:\temp\flickr” -p

5) Use burning software to backup Flickr photos, videos and associated meta-data. Photo set and photo meta data attributes are backed up nicely. The one piece of meta data my solution does not backup is what photo sets make up a collection. If you have any ideas how to accomplish this please leave a comment. I needed to span several dual layer DVDs so I sorted by date (descending) to ensure I didn’t miss anything during the backup process. I used DateTaken: to filter data per disc.

Lets put it all together now into a BackupFlickr.cmd script for scheduling

REM Format current date
set FILEDATE=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%

REM Change drive to e:\
e:

REM Change folder to where python script is stored
cd \Data\Scheduled Tasks\Windows\Flickr

REM Backup Flickr Set Metadata
python Offlickr.py -i <strong>11111111@N00</strong> -d "e:\temp\flickr set metadata" -v -s

REM 7-Zip the files using 7z compression which is much better than zip
\Dropbox\apps\7-Zip\7z a -mx7 "Flickr Set Metadata %FILEDATE%.7z" "e:\temp\Flickr Set Metadata"
REM \Dropbox\apps\7-Zip\7z a -tzip "Flickr Set Metadata %FILEDATE%.zip" "e:\temp\Flickr Set Metadata"

REM Backup Flickr Photo Metadata
python Offlickr.py -i <strong>11111111@N00</strong> -d "e:\temp\flickr photo metadata" -v

REM 7-Zip the files using 7z compression which is much better than zip
\Dropbox\apps\7-Zip\7z a -mx7 "Flickr Photo Metadata %FILEDATE%.7z" "e:\temp\Flickr Photo Metadata"
REM \Dropbox\apps\7-Zip\7z a -tzip "Flickr Photo Metadata %FILEDATE%.zip" "e:\temp\Flickr Photo Metadata"

REM Backup Flickr Photos and Video and Metadata except set metadata
python Offlickr.py -i <strong>11111111@N00</strong> -d "e:\temp\flickr" -p

REM Remove unneeded Metadata files that are automatically downloaded with Flickr Photos and Video
cd \Temp\Flickr
del *.xml /f /q