I
Immich•2y ago
Wingy

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.
No description
No description
No description
18 Replies
bo0tzz
bo0tzz•2y ago
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.
Wingy
WingyOP•2y ago
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
Wingy
WingyOP•2y ago
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...
Wingy
WingyOP•2y ago
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...
Wingy
WingyOP•2y ago
thanks!
Wingy
WingyOP•2y ago
@bo0tzz i have quite a few that failed, do you know how i could get them to import properly?
No description
bo0tzz
bo0tzz•2y ago
Hmm, good question. If you just try to reupload them, they will get rejected because the asset already exists 🤔 @Alex @jrasm91 thoughts?
Daniel
Daniel•2y ago
So those assets have been stored in the database but didn't get moved? Do they have originalPath set?
Alex Tran
Alex Tran•2y ago
Try to run stoeage migration again, then probably try to re upload those files over the web interface
jrasm91
jrasm91•2y ago
Well, look to see if storage migration reports any errors (immich-microservices logs) and send those here
Wingy
WingyOP•2y ago
ok, attempting to run the migration job watching immich-microservices's logs
Wingy
WingyOP•2y ago
No description
Wingy
WingyOP•2y ago
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
Wingy
WingyOP•2y ago
these are the files still in the upload dir
No description
Wingy
WingyOP•2y ago
tried running the job again and got the same 2 errors
jrasm91
jrasm91•2y ago
Looks like two orphans maybe? The two files with errors are different than the two in the upload directory, correct?
Wingy
WingyOP•2y ago
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

Did you find this page helpful?