immich-cli upload prompts to upload some pictures every run
I run the cli upload on a 2k picture folder, it finds some 700-ish pictures to upload and re-uploads them. It re-uploads those 700-ish pics every time the command is run.
I've checked if it actually uploads them and generally seems like it, but I've seen one or two on my folder that don't show up in Immich itself. These are normal jpg pics taken with my phone.
14 Replies
So it prompts to upload 704 files everytime you run the CLI?
Yes
I've actually isolated which 700, I could maybe test on a single problematic picture one sec
Well, same problem with just 1 picture
It doesn't actually import it a second time though? It might upload it then realize it's a duplicate though.
No duplicates in immich itself no
This one is actually there on immich (just once, correctly) I've run the cli to upload it 10 times probably now
Were the 700 photos possibly uploaded via the mobile app beforehand?
yes
that was from the time I was toying with the app
Right, so it's working as designed currently.
We don't know it's a duplicate until after uploading it. In the future the CLI will hash the file and skip the upload if it already exists. Right now it uploads it and then it's hashed and marked as a duplicate.
I see, so I should see something in the logs for one of services about the duplicate
And maybe the ones I dont see on immich are ones that I deleted from the phone app
(garbage pics)
server side detecting I deleted them and ignoring the upload too
If it is deleted in immich you should be able to re-upload it again.
When there is a duplicate, you should see a unique constraint violiation in the database logs, but I think that's it.
You could also view your total asset count in the administration page and you can verify the count for total assets isn't increasing.
I said that because I recall reading about a "mark as unwanted" mechanism for some edge case where a deleted pic kept being reuploaded in a guys phone but that was probably app-side, don't mind me
I'll reaaally check for the 700 to be in the site and delete this local copy folder
Moving all my pics to immich hahah
Haha nice
Yeah, there is a separate issue of keeping track of files that have been deleted somehow to prevent the mobile app from re-uploading them over and over. We haven't solved that yet.
If you delete a photo from immich and it's still on the phone and it's still in an abum that is selected to be backed-up, it will re-upload the file again.
That's still an existing problem.
When you re-upload a file to immich that already exists on immich it actually fails to put it in the database due to a uniqueu constraint we have requiring all file hashes to be unique (per user) and the operation actually fails, so it doesn't actually get created.
Thanks a lot for the quick support
Quick "fix" would be to feedback to the cli the fact that it found N duplicates or something, would prevent people in my situation from asking xD
Funnily enough
https://github.com/immich-app/CLI/pull/92
The CLI has quite the long list of backlogged PRs waiting to be merged 🙂
Great success
Well that solves it, thanks again have a nice day