Closed thierrybla closed 1 year ago
Photo before the job
and after:
They are both in my library at this moment.
Hello, did you change the path when you ran the migration job or did you keep the old path? let me know and I can help taking a look
Hi! Thanks for the quick answer! I only changed the file name.
@thierrybla Can you elaborate on changing the file name? Can you show the exact value changed in the storage migration box?
Please note that any manual file system level operation will not applied to Immich because it causes the mismatch with the Immich's database
This is basiclly what I did and then ran the job.
Please note that any manual file system level operation will not applied to Immich because it causes the mismatch with the Immich's database
I didn't change anything manually.
@alextran1502 do you have time to debug this?
I did try and run the migration with the same template you specified but couldn't reproduce the issue you are having 🤔 . Can you try on the new release version?
I did try and run the migration with the same template you specified but couldn't reproduce the issue you are having 🤔 . Can you try on the new release version?
Should I start from 0? Do you have any way to remove the created duplicates?
Besides manually deleting them on the web, we don't have any other way. I am not sure about this bug, seems strange
Besides manually deleting them on the web, we don't have any other way. I am not sure about this bug, seems strange
What checks does immich do for duplicates? Seems having a different name is already enough to upload the same file twice?
Thank you for the swift replies :).
A duplicate in Immichs means byte for byte identical files. If that's not the case with your files, then it's working as designed. We hope to improve this in the future.
A duplicate in Immichs means byte for byte identical files. If that's not the case with your files, then it's working as designed. We hope to improve this in the future.
Is this only upon upload or is there a background job for this as well?
We calculate the file hash on upload and store it in the database. There is a unique key constraint on the column that makes it impossible for two files with the same hash to exist (for a single user). So uploading the same file again would not create a new record.
We calculate the file hash on upload and store it in the database. There is a unique key constraint on the column that makes it impossible for two files with the same hash to exist (for a single user). So uploading the same file again would not create a new record.
Hmm I see, still weird how Immich somehow made a duplicate of almost all my library files after running the job..
@alextran1502 I have a zip attached with the original photo and the photo that immich duplicated, maybe put the original photo called "2023-05-18-IMG-20230518-WA0000.jpg" into your own Immich and run the job yourself. It might be interesting to see if it also dupes it for you.
I will start over from scratch for myself.. this time I will right away change the template to something I want and not change it after the uploads are done. 2 photos.zip
Upon looking at the assets in the file browser, looks like they are two different version
The date modified and the size are different
Upon looking at the assets in the file browser, looks like they are two different version
The date modified and the size are different
I can assure you that I didn't manually edit these files myself or used a different program to do anything to it after upload. Could immich change the things itself?
To add, I uploaded the image with the CLI tool on the 20th and used the rename job on the 21th.
Immich doesn't touch the original file beside moving them to the template you specify. Can you start fresh and upload a few files and then try to move them again? Can you help record the change in the template?
I will upload some images when I start fresh and try to reproduce what I did. I will report back here once I have done that.
For now I don't experience it, I will upload all my photos and see if something happens.. For now I will close this issue and reopen when I experience it again.
The bug
After using the "STORAGE TEMPLATE MIGRATION" job it makes quite a lot of duplicates.
The OS that Immich Server is running on
Docker
Version of Immich Server
v1.56.2
Version of Immich Mobile App
v1.56.2
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response