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
I ran into this as well. You can do a cli import of the media, but its not working for me.
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/
Just the database. My media is mounted into the container.
What media did you restore, just the originals? There are four folders: thumbs, uploads, profile, and library.
So with truenas scale immich, they give options for mounting into each of the 4. I have only media mounted into the library folder

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
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
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.
Yeah you would have to do all
Videos are good, but not live photos. I'm taking these with the google camera app.

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?
I haven't messed with those. Hopefully you can read this

Trying in brave and in the app doesn't work either
I normally use firefox
Did you run transcode for all videos? Maybe this is a bug. It has fixed the issue for all videos minus android live photos?
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'
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.How would I do that?
I hoped/assumed that running the transcode "all" would have done that.
You ran that job, correct?
I did run that
I can try again
OK. I think this is another issue.
No, don't bother.
This is specifically with android live motion videos?
Yea
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/
.What an edge case lol
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 🙂Wait, doesn't this mean that the live photos are lost?
Lemme try deleting from immich and reuploading
No, specifically for android the video is extracted from the original jpeg, which is stored in
library/
.Got it, k
Yea, that worked for the one photo I chose
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.Shouldn't extract metadata already fix this?
Oh you mean this condition? It already has a live photo linked to it that references a mp4 file that doesn't exist anymore.

Oh you're right. Would you check for that file in the metadata extraction or in the transcode video?
I think the assumption is running "transcode all" should fix all generated content that is stored in
encoded-video/
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.
I actually went through and did that already lol. I appreciate the thoughts though
Oh lol, ok. Could you maybe create an issue for this problem on github? This would help us with tracking it
Sure, should I label it a bug?
Yes pls
Oh nice issue number
https://github.com/immich-app/immich/issues/4444
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...
Haha perfect, thanks!