A photo storage strategy

Every photographer needs a good storage solution and workflow for editing. As a hobbyist, I wanted something flexible that would let me edit my photos from any machine in my house. I also wanted to practice proper redundancy, which I wasn't achieving in my old setup. I'm hoping this post will inspire fellow novices with their own workflows.

The Old Way

Storage:

  • All photos on a 6 TB WD My Book external hard drive connected to my desktop PC.
  • Backblaze backup to the cloud.

Workflow:

  1. Take pictures.
  2. Upload SD Card via Windows import to External HDD into a new folder.
  3. Browse JPEGs and write down file names.
  4. Search for equivalent RAWs and import to Lightroom CC.
  5. Edit and export to a different folder denoting edited photos.

Analysis: The external HDD has got tons of space and backs up to the cloud, but it's not super optimized. It bogs down the boot time on my machine. It's noisy. And the photos stored there are not accessible from my other devices, like my iPhone or Macbook.

I recently built a new SFF (small-form factor) PC with nVME SSDs. Attaching a slow, thunking external definitely goes against the SFF philosophy of minimalism. This also meant I now had an old PC sitting taskless in the corner.

Furthermore, uploading to an external hard drive makes for tedious editing. Though upload gets a new directory, there is not an easy way to make sub-directories. Sifting through hundreds of files can be overwhelming. It makes the editing process painful, especially if there is a lot of time between uploads.

The New Way

But, after some thinking and blind tinkering, I found a solution that fits my needs. It's not perfect but it feels good and can shine with further optimizations.

  1. Ubuntu Server with Samba.
  2. rsync
  3. exiftool
  4. NAS (Network-Attached Storage).
  5. Backup NAS via AWS.

Storage

  • Old Windows PC converted to Ubuntu Server with 1 TB HDD (more hard drives coming).
  • Ubuntu has Samba server which allows any of my machines to read and write to the Shared photo drive.
  • Ubuntu Server is backed up to my NAS with 6 TB HDD storage.

Workflow

  1. Take pictures.
  2. Upload SD Card from anywhere.
  3. Use exiftool to categorically organize photos by Year and Month, then organize the photos by type.
  4. Copy directories to Ubuntu via Samba.
  5. Use rsync to backup photos to NAS.

Analysis: Samba is a great tool. It allows Linux, Windows, and Mac operating systems to connect to one another. This means the 1 TB HDD is accessible to anyone on my local network (with proper credentials, of course). I can upload photos from my MacBook, then later pull them from my iPhone or PC and edit them in Lightroom.

exiftool enables organizational magic. It's a very powerful command line tool that reads and acts upon the exifdata of your photos. For example, I use two commands to organize photos by Year and Month directories. Then I use another to organize those organized photos by file type. I cannot overrstate how nice it is to have files organized this way. JPEGs load faster, so browsing JPEGs and finding the same RAW has never been easier. I am still tinkering with commands to optimize the workflow. See below for examples.

rsync backs everything up. It's a Linux staple that syncs files between two locations. It doesn't create duplicate files, making it safe to run in a nightly cronjob on the Ubuntu server to the NAS backup. It is also the tool to backup to AWS.

Backing up to the NAS comes with additional perks. Synology offers an app called "Photos Mobile" on iOS. This let's me view all of my camera photos off the NAS itself. I love having my camera photos stored separately from my iPhone photos and being able to view either in a beautiful app.


Commands

Command #1

Move files to folder organized by Year/Month

exiftool -d %Y/%m "-directory<filemodifydate" "-directory<createdate" "-directory<datetimeoriginal"

Command #2

Move files to folder organized by file type, such as JPEG, RAF.

exiftool -r -directory="%d/%e_images" .

Command #3

Syncs files from Samba to NAS.

rsync -avi --exclude=".*" /media/hdd/photos/ <server>::photo/all/

Visuals

Simple network diagram
Before: Lumped files prior to exiftool
After: Organized files

Resources

ExifTool by Phil Harvey
A command-line application and Perl library for reading and writing EXIF, GPS, IPTC, XMP, makernotes and other meta information in image, audio and video files. For Windows, MacOS, and Unix systems.
How To Use Rsync to Sync Local and Remote Directories | DigitalOcean
Rsync is a tool for intelligently syncing local and remote directories. In this article we will explore the basic usage of this utility to copy files from di…
Install and Configure Samba | Ubuntu
Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.

Subscribe to Eric Brock

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe