Jump to content

How to re-index Photoprism using the command line


FunkyBuddha

Recommended Posts

Posted

Currently, Photoprism does not have a built-in scheduler for indexing your content. The usual way is to trigger the indexing process via the UI.

 

Two methods to re-index:

  • Schedule a cron job to re-index
  • Run a script manually to review the output of the indexing process. You can run it as a background process and output the results via nohup.

Running the script manually via nohup has advantages. It allows you to review errors in the indexing process. For example, Photoprism skips indexing when the filename extension does not match file format (ie. extension is .png when it is a jpeg file), duplicates, etc.

 

Run Script in Background:

Quote

#!/bin/bash -x
homedir=/my-path
cd $homedir
rm nohup.out
nohup ./index_photoprism.sh &

Index Script (index_photoprism.sh):

Quote

#!/bin/bash -x

docker exec -t <replace-with-container-name> photoprism index

 

  • Thanks 1

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...