photoprism / photoprism-docs

Official Documentation (English)
https://docs.photoprism.app
Other
61 stars 108 forks source link

command line import moving not copying #103

Closed dmtalon closed 2 years ago

dmtalon commented 2 years ago

I read somewhere (here I believe) that said for import, copy is the default, however when I run the import command below, it moves files from the import directory. I tried using --help but it doesn't supply additional options to trigger copy vs. move but indicates it moves files.

I am using the command: docker exec photoprism import I tried --help and it says that it 'moves' media files to originals.

Is there a flag to copy?

My use case is, that I am uploading photos via the NextCloud app to the NextCloud Photo directory which is set as the import directory. Unfortunately, this does not auto-trigger importing, so I plan to run a cron task to trigger the above command. I would like the option to leave the photos within nextcloud also.

lastzero commented 2 years ago

When you run photoprism help, all available commands are displayed:

COMMANDS:
   start, up   Starts the web server
   stop, down  Stops the web server in daemon mode
   status      Checks if the web server is running
   index       Indexes original media files
   mv, import  Moves media files to originals
   cp, copy    Copies media files to originals
   ...

So mv (or import) should move, while cp (or copy) should copy. If that does not work as described, let us know! 🤔

dmtalon commented 2 years ago

Thank you for the reply. If I use 'copy' will that trigger indexing of the newly copied photos? Because that is my 'sticky' point right now. Getting Nextcloud synced photos to 'automatically' be introduced into photoprism. (copied from import, and indexed).

lastzero commented 2 years ago

It should

dmtalon commented 2 years ago

That appears to work exactly how I want!! I did not see copy as an option by looking here:

https://docs.photoprism.app/getting-started/docker/

which lead me to only using help as follows.

docker photoprism import --help docker exec photoprism index --help

So, I unfortunately missed the larger help file :/

Thank you again for your quick reply. I will put a cron task to run the 'copy' command every so often to import new uploaded photos.