I
Immich•2y ago
Jiibus

Missing profile folder after DB restore

Pasting here from general. So I messed up in some oauth troubleshooting attempts (thought maybe my install was jacked up and did a db backup via pgadmin then wiped it) and after a db restore the folder for my user in upload/profile didn't get recreated. As a result none of the images in the timeline load. What's the best way to get back up and running? I still have all my media in a folder I mount into the container.
41 Replies
lost
lost•2y ago
I ran into this as well. You can do a cli import of the media, but its not working for me.
jrasm91
jrasm91•2y ago
Photos in the web app come from the thumbs directory. What did you restore exactly? Just the database and the library folder? Photos come from the thumbs/ directory and only your profile picture comes from profile/
Jiibus
JiibusOP•2y ago
Just the database. My media is mounted into the container.
jrasm91
jrasm91•2y ago
What media did you restore, just the originals? There are four folders: thumbs, uploads, profile, and library.
Jiibus
JiibusOP•2y ago
So with truenas scale immich, they give options for mounting into each of the 4. I have only media mounted into the library folder
No description
Jiibus
JiibusOP•2y ago
The rest were held in internal container storage and those got wiped when I deleted the app I'm fine with starting over if need be, just want to know how to import my existing media into the new user if that's the case
jrasm91
jrasm91•2y ago
Ok. I would just try running generate thumbnails job again. You don't need to run the machine learning jobs so I would pause those If the database is restored and the library media, just re run the jobs to generate thumbnails and transcode videos should basically get you back up and running again. The generated content is basically missing is all
Jiibus
JiibusOP•2y ago
I'll give that a shot! So that worked for the thumbnails, but all the videos & live photos are throwing up MIME type errors I ran the transcode videos job too, but only missing. I'll try doing the All option.
jrasm91
jrasm91•2y ago
Yeah you would have to do all
Jiibus
JiibusOP•2y ago
Videos are good, but not live photos. I'm taking these with the google camera app.
No description
jrasm91
jrasm91•2y ago
This may be unrelated to the backup and restore, but just a general trancoding issue in general. Can you check what your target codec is set to in ffmpeg settings and/or try viewing the video on another browser/device?
Jiibus
JiibusOP•2y ago
I haven't messed with those. Hopefully you can read this
No description
Jiibus
JiibusOP•2y ago
Trying in brave and in the app doesn't work either I normally use firefox
jrasm91
jrasm91•2y ago
Did you run transcode for all videos? Maybe this is a bug. It has fixed the issue for all videos minus android live photos?
Jiibus
JiibusOP•2y ago
So whenever I try a live photo I get this error [Nest] 8 - 10/11/2023, 10:16:42 AM ERROR [ExceptionsHandler] ENOENT: no such file or directory, access 'upload/encoded-video/fa2260ba-ca94-4e91-93d7-f6325125a679/36/10/3610befa-d64e-4c2c-8a04-e3232a30a061.mp4' Error: ENOENT: no such file or directory, access 'upload/encoded-video/fa2260ba-ca94-4e91-93d7-f6325125a679/36/10/3610befa-d64e-4c2c-8a04-e3232a30a061.mp4'
jrasm91
jrasm91•2y ago
Right, this means the file that was generated originally, is now missing, which makes sense since you deleted / restored everything. The encoded-video/ needs to be regenerated.
Jiibus
JiibusOP•2y ago
How would I do that?
jrasm91
jrasm91•2y ago
I hoped/assumed that running the transcode "all" would have done that. You ran that job, correct?
Jiibus
JiibusOP•2y ago
I did run that I can try again
jrasm91
jrasm91•2y ago
OK. I think this is another issue. No, don't bother. This is specifically with android live motion videos?
Jiibus
JiibusOP•2y ago
Yea
jrasm91
jrasm91•2y ago
I think this might be a bug/limitation. Let me look at something. @Daniel - can you work on this? Basically, if you upload an android live photo, then delete the encoded video folder, then re-generate/transcode all videos again, the android motion one will be broken. I think "generate all videos", needs to have a special case to handle android live motion videos, which are "original assets", but stored in encoded-videos/.
Jiibus
JiibusOP•2y ago
What an edge case lol
jrasm91
jrasm91•2y ago
Basically encoded-videos/ is supposed to be 100% generated content and the assumption is you can re-generate it, which is why you don't need to back it up, but as you have seen it doesn't handle the motion part of android live photos lol. It's a good find 🙂
Daniel
Daniel•2y ago
Wait, doesn't this mean that the live photos are lost?
Jiibus
JiibusOP•2y ago
Lemme try deleting from immich and reuploading
jrasm91
jrasm91•2y ago
No, specifically for android the video is extracted from the original jpeg, which is stored in library/.
Daniel
Daniel•2y ago
Got it, k
Jiibus
JiibusOP•2y ago
Yea, that worked for the one photo I chose
jrasm91
jrasm91•2y ago
Live photos for ios are two separate "original" files, both are stored in library/. For android the jpeg has the live photo embedded in it, so we extract a copy into encoded-video/, make a separate asset for it and link them together. That "original" got deleted and needs to be re-extracted.
Daniel
Daniel•2y ago
Shouldn't extract metadata already fix this?
jrasm91
jrasm91•2y ago
Oh you mean this condition? It already has a live photo linked to it that references a mp4 file that doesn't exist anymore.
No description
Daniel
Daniel•2y ago
Oh you're right. Would you check for that file in the metadata extraction or in the transcode video?
jrasm91
jrasm91•2y ago
I think the assumption is running "transcode all" should fix all generated content that is stored in encoded-video/
Daniel
Daniel•2y ago
All right! @Jiibus How many assets are affected by this? Or probably the better (although impolite) question: is it feasible for you to re-upload all broken motion photos? If possible, I would like to postpone this a little bit and in exchange come up with a "clean" solution.
Jiibus
JiibusOP•2y ago
I actually went through and did that already lol. I appreciate the thoughts though
Daniel
Daniel•2y ago
Oh lol, ok. Could you maybe create an issue for this problem on github? This would help us with tracking it
Jiibus
JiibusOP•2y ago
Sure, should I label it a bug?
Daniel
Daniel•2y ago
Yes pls
Jiibus
JiibusOP•2y ago
GitHub
[BUG] Transcode videos Android Live Photos issue after DB restore ·...
The bug If an immich install is wiped then the database restored, the transcode videos job does not handle the small video that's a part of an android live photo. When trying to view a live pho...
Daniel
Daniel•2y ago
Haha perfect, thanks!

Did you find this page helpful?