Skip Navigation

Photoprism rebuild issues

TL;DR - had to rebuild my PhotoPrism database and now my originals count is off by ~5,000. Can I do a full sync of my devices and have it only upload what is missing?

Hello gurus,

I’ve been running Photoprism for quite some time and I’m happy with it.

I ran to an unrelated issue with my database (MariaDB) and has to rebuild the database. PhotoPrism uses this instance of MariaDB so naturally the metadata was gone.

The original pictures (originals) were stored in a separate array so at a minimum I still have all my pictures. I rebuilt the database and PhotoPrism (docker container) and pointed it to the array for the originals. Once that was done, I logged in to the PhotoPrism UI and perform a complete rescan and index of my originals. Once it was done, I noticed that my originals count was 27,000 but i should have 31,000 objects (according to a picture I took of the PhotoPrism UI I took the night before rebuilding the database). So I started digging a bit.

  • The array itself (where my originals are stored) is showing 27,000 objects.

  • The pictures I took the night before rebuilding the database and PhotoPrism containers said that the count of originals was ~31,000.

  • The two main devices backing media to PhotoPrism is my phone and my wife’s phone. My phone shows ~4,500 and my wife’s sores ~26,500.

  • Since these two phones are previously fully backups a few weeks before the rebuild I should have ~31,000 objects in the originals.

My question is, can I redo a full backups sync of both phones (through PhotoSync) and have it only copy the objects that are not in the originals?

Since the database has to be rebuilt, I fear that if I do another full sync, it will just copy everything again and I end up with ~60,000 objects rather than the ~31,000 I should have.

What can I do to see which objects are missing between my devices and PhotoPrism and how can I only copy those over to PhotoPrism?

4

You're viewing a single thread.

4 comments
  • I am far from a photo prism expert but I can safely say the indexing algorithm is weird and takes multiple runs to finish. Logically I would expect to run it once and it would do everything in one scan but I've found it takes sometimes 3 to 5 full scans to update and properly catch up to major changes. It's almost like it acknowledges big changes and documents it but waits for multiple passes before committing it. Also it does a really good job when scanning to look or duplicate images and stacking/repointing to the valid file. I would advise running the indexing another 2 or 3 times if you are confident the 31k files are actually on storage and just not showing up on the database.