Migrating Photos to Photoprism Via Rsync

Reading Time: 2 minutes
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.

This morning I opened Photoprism in the browser and chose to import the folder, making sure to have "move" selected. With "move" selected files that are finished with are deleted from the import folder to keep things tidy.

Resume

The advantage of using rsync is that if either machine crashes, or if the transfer is interrupted you can resume from where the issue occurred. I had to resume once during a previous transfer.

Remember, don’t ask Photoprism to import the directory until all the photos have been ingested, because if you do it might transfer the same files over and over.

Integration with Kdrive Photo Backup

I automatically backup the photos from my phone to kdrive, and from kdrive I back them up to a local hard drive. With Rsync I can transfer the files from the local backup to photoprism to ensure that I have a complete backup.

The Photosync app for Android and iOS works well, but it can take hours, if not days to back up photos especially if the originals are stored in iCloud and they need to be downloaded back to the phone before being uploaded to Photoprism, and Immich.

By using Kdrive to backup all photos locally and using rsync to transfer them to the Photoprism import folder you’re saving time, especially given that iOS devices have storage limitations.

The other advantage is that it doesn’t alter exif information. The files are only moved from one device to another, not altered.

And Finally

Whilst transferring files with Rsync takes hours, and importing those files into Photoprism also takes hours, all of the work is done without the need for human intervention.