Photoprism

The Backup Shell Script for Photoprism and Immich

When I go out to cycle, run, and do other things I take photos and when I come home I sync them to photoprism on one laptop and immich on a separate Raspberry Pi. I use photosync to sync to Photoprism.

Once images are ingested I usually run a script almost daily. Rather than give you the lines of shell script I’ll explain what it does. It checks that the photos SD card is mounted, as well as the backup drive before using rsync to synchronise between the primary and backup locations and then from the laptop running photoprism to the Pi running a second instance of Immich.

On Resolute Raccoon and Photoprism

Yesterday when I was looking at Photoprism, and synching from one drive to two other drives, and a second instance I noticed that for some reason I only had the last two months of photos. I eventually noticed that the photos are now living in run/media/… rather than /media/… and it is for this reason that Photoprism could see recent photos but not the entire library.

media/username/library still mounts, but the proper mount point is run/media/username/library moving forward. That’s why I could see recent photos but not photos from before the OS update.

Migrating Photoprism From One Machine to Another

Due to the Raspberry Pi 5, and older, having issues with heat throttling and more it makes sense to build a Photoprism on a “normal” laptop before migrating towards the Pi. The process is an interesting one.

Photo Consolidation

The First step is to consolidate your photos from Google Photos, Apple Photos, Flick and any other source you might have. The simplest method is to organise them chronologically, and then to spend time removing as many duplicates as possible. There are tools for that. They will help you add exif data back into the photo exif fields, as well as look for duplicates.

On Familiar Faces and Forgotten Names

It’s amusing. I look through Immich and Photoprism and I am struck by how many names I have forgotten, but how easily I remember certain faces. I’m also curious to see how I remember certain names after scrolling through faces yet to be identified.

Decades ago when I was playing with iPhoto and Picasa I knew all these people well, and I saw them daily. It was easy to match faces to names. Now it’s a challenge, because I haven’t seen these people in years, if not decades.

On PhotoSync and Photo Uploader for Photoprism

Photosync is a photo uploading app that allows you to upload to various devices and cloud solutions with ease. Photo Uploader for Photoprism is a specialist app for Photoprism. The reason for which I bring up both of these apps is that they allow you to sync to photoprism.

When I was testing uploads with Photosync I noticed that I can upload to the Photoprism library directly but that it creates a “current_phone” folder, and adds photos within this folder. Since my originals folder is meant to be clean and chronological this breaks the flow I want.

Sorting Photoprism Photos With the Mistral Cat

I chose to experiment with Le Chat by Mistral, the French AI alternative to Gemini, Claude and CatIFARTED (ChatGPT). For the experiment I copied my Photoprism photos from the drive I use that is connected a Raspberry pi to a laptop before running scripts to sort and remove duplicates. It worked well, with a nice little bonus which I’ll expand on later.

Goal: Clean Up Duplicate Photos

My objective was to Remove duplicate photos from a large collection while keeping the best version of each file. I Used jdupes to identify duplicates and a custom script to decide which files to keep.

Migrating Photos to Photoprism Via Rsync

I downloaded my photographs from Google Photos via Google Takeout before using Exiftool to repopulate the exif metadata. Once this was done, I had to move the files from the mac to the Raspberry Pi running photoprism. For this I used rsync because it can run in the background as you sleep.

The Rsync command

The command is rsync -avzP /source/ user@remote_host:/destination/

-a is for the archive mode

  • v is verbose. It tells you what it’s doing -z compresses data to save a little on bandwidth -P gives you a progress report in the form n/total number of files.

The Process

With Photoprism I moved the files from the takeout folder, in full, to the import folder in Photoprism. As there were a lot of files I let it run overnight.

The Mature Phone Photo Backup Landscape

Many years ago, if I took photos with a nokia phone I had to sync them via a memory card. With the arrival of the Android Nexus on and the Apple iPhone our digital photography habits changed. With time we would leave our cameras at home, and carry our mobile phones, and photograph paries and hikes with these.

In the process we had two apps to backup. Google Photos and iPhoto. Both of these were optimal for whether we were on iOS or Android. For a while this was fine because they automatically backed up to our computers. With time though, the backup was more and more cloud centric, to the point where our photos were now either on iCloud or Google Photos.

On Self Hosting and Having Multiple Devices

I grew up in the eighties, and 90s, and so computing, open source software and the world wide web grew up with me. In that time we went from going to magazine shops to buy mags, and cd shops to buy CDs, and book shops to buy books. We also took photos on rolls of films and then took those rolls to La Combe or the Garden Centre to have the films processed, and then we put them in albums.

A Move from Self-Hosting on a Pi5 8gb to a Pi5 4gb Continued

Yesterday I shifted my data and setup from the Pi5 8gb to the Pi5 4gb with relative ease. I rsynched the data from one Pi to the other, brought up the docker containers, checked that they were working before shutting down the other Pi. I then swapped the 8gb Pi with the four gb pi and turned on the four gb Pi, after plugging the hard drive that I use to store photos and audiobooks and podcasts.