Missing File?
It looks like a file from my phone was partially backed up but never saved to disk. Its metadata is in the Immich database but otherwise has never existed in any snapshot. Is this a bug? I don't mind losing the file but I'm not sure what happened here.



18 Replies
There's an unfortunate race condition where Immich can lose track of where a file is stored. It should still exist somewhere, probably in the upload folder. The file moving logic is unfortunately very tricky, but we are working on improvements for this.
ok thanks
is there a gh issue for this? i'm not sure if i could fix it but i'd like to at least look at it
GitHub
[BUG] assets may become orphaned when moved by the storage template...
The bug I uploaded 8.5k files to Immich with the CLI and waited for all the jobs to process. Things look mostly fine, except some assets are missing thumbnails. A look at the jobs status page shows...
GitHub
refactor(server): make file movement more resilient by danieldietzl...
Closes #2877
Instead of moving a file, updating the database, and trying to undo the move on failure, this PR changes the process to instead persist pending move information to the database, making...
thanks!
@bo0tzz i have quite a few that failed, do you know how i could get them to import properly?

Hmm, good question. If you just try to reupload them, they will get rejected because the asset already exists 🤔
@Alex @jrasm91 thoughts?
So those assets have been stored in the database but didn't get moved?
Do they have
originalPath
set?Try to run stoeage migration again, then probably try to re upload those files over the web interface
Well, look to see if storage migration reports any errors (immich-microservices logs) and send those here
ok, attempting to run the migration job
watching immich-microservices's logs

had 111 images sitting in the uploads dir, down to 2
the specific image i was noticing missing is there now, no need to reupload it by the web interface
these are the files still in the upload dir

tried running the job again and got the same 2 errors
Looks like two orphans maybe? The two files with errors are different than the two in the upload directory, correct?
yes, their uuids are different
the ones that are erroring are both named FullSizeRender+2.jpg from the same date, and the ones in the upload directory are movs