-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] CLI Upload Repeatedly Tries to Upload - duplicate key violations in postgres logs #3615
Comments
I see the same behavior: duplicate uploads of movies on every attempt of doing a sync. This also seems to makes the "remaining" assets count confused. This is from iOS iPhone. I like this app, but for a backup solution, more work needs to be put into reliability and resiliency (uploads pause frequently) of the backup process. It is if difficult to have confidence that everything is being properly synced as a user. Maybe look into using something like syncthing or rsync under the hood? |
The cli will skip assets that it initially uploaded, but that's it. Duplicate assets will cause unique key violations in the logs and that is fine and expected. This is probably happening because duplicates were uploaded from another source. There is some work in progress regarding the CLI and mobile apps to have a better algorithm for determining what to upload and what to skip, but it is working as currently designed, even if it has some limitations. |
@jrasm91 - appreciate that this is expected behaviour - I can cope with that :) However, can I ask where the better algorithm stuff is being tracked, so I (and other interested parties) can follow it? Thanks!! |
The bug
When running the CLI (via a docker / bash alias - as documented here, I expect the upload to bypass future uploads of the same directory. However, in some directories I try to upload, I get repeated attempts to upload the same number of files, which fail, due to a duplicate key check in postgres.
Is this expected behaviour? I'm a new user to immich - my rough timeline of usage:
~72 hours ago - initial setup and uploading from my iOS phone - only photos taken in the last 3 months
~48 hours ago - adding another album on my phone (an iCloud shared photo album) - this is still not fully uploaded. Includes photos from years ago (I think this might be relevant, and the cause of the duplicates)
~24 hours ago - doing a first upload from the CLI, for older photos that mostly weren't on my phone, which I left running overnight - didn't run with --recursive accidentally, but had a lot (~6000) of photos in base directory. Didn't pay attention to whether there were duplicates.
~2-3 hours ago - trying to do more CLI based uploads, and noticed this weirdness with repeated attempts to upload via CLI.
I saw issue #975 - but it doesn't seem to be exactly this situation.
The OS that Immich Server is running on
Docker on Debian 12 (amd64)
Version of Immich Server
v1.72.2
Version of Immich Mobile App
v1.72.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
The text was updated successfully, but these errors were encountered: