Closed GuoxiongXie closed 8 months ago
41481 files already on the server means that immich-go tried to upload those files, but immich has detected them as duplicates.
My guess is that files from your archive has copies of the ones already uploaded, but with different name. To spot them, add -log-level=INFO
beside the -log-file
and check if you find them on the server.
Here is how duplicate detection works when using immich-go and immich:
The dry-run doesn't upload anything, so in this mode the SHA-1 check isn't not done. hence the difference in the report.
Wow, your guess is indeed correct! Thanks simulot for your help and clarification!
Hi simulot and team, first of all, thanks a lot for your useful tool! I tried to upload a directory that contains both photos and videos to immich. I first uploaded them through the new immich cli, but some files fail to be uploaded. Immich server stats on admin page shows that I have 24441 photos and 13852 videos on immich server. Then I came across your useful tool and decided to pick up the missing files using your tool.
Here are the steps that I reproduced the issue:
Step 1: I first did a dry run using the following command:
I checked the logs of dry run, and saw the following:
It says "3184 uploaded files on the server", I assume that means there are 3184 missing files that will be uploaded to immich server when I issue a real/wet run. It also reports that "38297 files already on the server".
Step 2: wet/real run
I ran the same command as Step 1 without -dry-run flag:
I saw the following logs (full log, I didn't omit anything below; there's no "Uploaded" log lines emitted):
I was surprised to see that "0 uploaded files on the server" and "41481 files already on the server". On the other hand, in dry-run (Step 1 above), the tool reported "3184 uploaded files on the server" and "38297 files already on the server". 3184+38297 = 41481. So, it seems like -dry-run actually uploaded those files for me and there's nothing for the wet run to upload. I cross referenced Immich admin page -> Sever Stats. It shows that I have 24441 photos and 13852 videos on immich server. These numbers are the same as the ones that I saw before I ran any immich-go command. So, nothing seems to be uploaded by immich-go tool. There's no error or warning logs, and there's no loglines showing which files were uploaded.
Step 3: dry run again to see if there's still some files that need to upload:
This step is exactly the same as Step 1 above, the same dry run command and the same log output. It reports that "3184 uploaded files on the server" and "38297 files already on the server", which confirms that the wet run in Step 2 didn't actually upload any file to the server.
Any pointer to workaround the issue will be highly appreciated! Thanks in advance for your help!