[GH-ISSUE #103] command line import moving not copying #23

Closed
opened 2026-03-02 16:47:06 +03:00 by kerem · 4 comments
Owner

Originally created by @dmtalon on GitHub (Feb 1, 2022).
Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/103

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.

Originally created by @dmtalon on GitHub (Feb 1, 2022). Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/103 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 <docker container> 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.
kerem closed this issue 2026-03-02 16:47:06 +03:00
Author
Owner

@lastzero commented on GitHub (Feb 1, 2022):

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! 🤔

<!-- gh-comment-id:1026527354 --> @lastzero commented on GitHub (Feb 1, 2022): 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! 🤔
Author
Owner

@dmtalon commented on GitHub (Feb 1, 2022):

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).

<!-- gh-comment-id:1026916421 --> @dmtalon commented on GitHub (Feb 1, 2022): 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).
Author
Owner

@lastzero commented on GitHub (Feb 1, 2022):

It should

<!-- gh-comment-id:1026926067 --> @lastzero commented on GitHub (Feb 1, 2022): It should
Author
Owner

@dmtalon commented on GitHub (Feb 1, 2022):

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.

<!-- gh-comment-id:1026962103 --> @dmtalon commented on GitHub (Feb 1, 2022): 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 <container> photoprism import --help docker exec <container> 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism-docs#23
No description provided.