#Immich Cannot start .immich file not present

1 messages · Page 1 of 1 (latest)

viscid flameBOT
#

:wave: Hey @jovial flame,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

jovial flame
#
root@docker-immich:/immich-app# docker ps -a
CONTAINER ID   IMAGE                                                COMMAND                  CREATED          STATUS                       PORTS     NAMES
18cdbf17fb91   ghcr.io/immich-app/immich-server:release             "tini -- /bin/bash s…"   23 minutes ago   Exited (1) 2 minutes ago               immich_server
3186b277f0ab   ghcr.io/immich-app/immich-machine-learning:release   "tini -- ./start.sh"     23 minutes ago   Exited (143) 2 minutes ago             immich_machine_learning
610b09fd2ad1   tensorchord/pgvecto-rs:pg14-v0.2.0                   "docker-entrypoint.s"   23 minutes ago   Exited (0) 2 minutes ago               immich_postgres
dd00f89b1d49   redis:6.2-alpine  ```
wintry hatch
#

I'd really want to see the result of the find command I posted earlier

jovial flame
#

dop you want me to do that command on my mount point uplaod folder ?

wintry hatch
#

find /mnt/immich-library/library -type f -printf "%T@ %p\n" | sort -n | cut -d' ' -f 2- | tail -n 10

#

This will show you the 10 most recent files

#

try an ls -la on one of those and see when it was created

jovial flame
#

ive done an ls la of this

#

-rw-r--r-- 1 nobody lxc-shares 34906170 Feb 12 10:48 20160912_131130.mp4

#

so a few weeks ago

wintry hatch
#

I'm going to assume you've uploaded files more recently than this?

jovial flame
#

honestely i cannot remmeber, i blieve i did upload on my dads phone so that should have created a folder under /library for him but it doesnt seem to be here

#

again i could be wrong i just cant remember well enough, i 100% know i downloaded the app on that phone logged in and start to upload a few files so i believe it SHOULD have created a folder for this

wintry hatch
#

You don't take pictures with your phone more than once per two weeks? 👀

jovial flame
#

havent set it up to auto backup

#

my issue is why i cant start this up now

wintry hatch
#

Still trying to figure out whether the previous mount was botched or the current one is

#

I'm 100% sure immich does not delete any .immich files

jovial flame
#
UPLOAD_LOCATION=/mnt/immich-library
THUMB_LOCATION=./library/thumbs
ENCODED_VIDEO_LOCATION=./library/encoded-video
PROFILE_LOCATION=./library/profile
BACKUP_LOCATION=./library/backups```
#

upload location is a seperate mount, rest of these are in the same location as the immich install (so the VM disk)

#
root@docker-immich:/immich-app# ls
docker-compose.yml  library  postgres

root@docker-immich:/immich-app/library# ls
backups  encoded-video  profile  thumbs

This is an overview of the immich install (VM disk)

#
root@docker-immich:/mnt/immich-library# ls
backups  encoded-video  library  profile  thumbs``` 
This is an overview of hte immich UPLOAD_LOCATION (my mount)
#

now iw would have loved if the mount for library just had a /library folder rather than encoded video / thumbs etc because all of these should be at the local VM disk, so why does immich decide to create all them folders which do not get used

wintry hatch
#

For now, try to carefully making the .immich files and keep track of which ones you made yourself, then check for any missing recent images

#

At least we can start debugging like that

jovial flame
#

so you want me to create .immich file in my mount section under all those sub folders ?

#

so /mnt/immich-library/backups encoded-video library profile thumbs ?

#

i would like to say ive got the dump.sql.gz file on hand so if you feel it might be best to just wipe this all and do it again that is another option

wintry hatch
#

Only the ones that prevent immich from starting

#

how recent is the dump?

jovial flame
#

before i done the update to new version

wintry hatch
#

It will just complain about the .immich files again though

jovial flame
#

well immich was working fine before the update, so even with this backup restore it would still complain ?

jovial flame
#

Failed to read upload/upload/.immich: Error: ENOENT: no such file or directory, open 'upload/upload/.immich'

wintry hatch
#

That'd be /mnt/immich-library/upload

jovial flame
#

no folder called upload

#

👀

wary flare
#

Well that’s your problem

jovial flame
#

so where the hell did it go

#

did the new update add this new folder requirement

wary flare
#

Post your compose file

#

Nothing changed

jovial flame
wintry hatch
#

It's the same as before

jovial flame
#

it is the same yes

wintry hatch
#

There should have been a folder called upload in /mnt/immich-library

#

Which leads me to the "botched mount" again

jovial flame
#

something serious has happeneed

wintry hatch
#

The good news is you're using storage templating

#

So all your images are in library

jovial flame
#

well again, idk if my dads phone has lost its pictures because im 90% sure he had a folder in /library when he uploaded form his phone, now its not there lol

wintry hatch
#

Ah right >.<

jovial flame
wintry hatch
#

can you ls -la /var/lib/docker/volumes/

#

wait that's only volumes nvm

jovial flame
#

should i create the upload folder and immich in there and start up ?

wintry hatch
#

You could try at least

#

It won't do any harm

jovial flame
#

ok so immich started and im in

#

also i would liek to add last week or two sometimes immich would not start and it would seem eveyrthing was reset i could not even log in, I had to run docker compose up with -d to start it up correctely

wintry hatch
#

-d is just daemonize, that's a flag you should always use

#

-v is the "remove volumes" flag that you shouldn't ever be needing

#

unless you're doing disaster recovery

jovial flame
#

ok so im on my dads account

#

[Nest] 18 - 02/27/2025, 10:51:50 AM ERROR [Api:GlobalExceptionFilter~zpiw61jj] Unknown error: Error: ENOENT: no such file or directory, access 'upload/library/57af17fd-bea9-43e9-8535-c4638a61a0f1/2025/2025-02-06/VID-20250206-WA0018.mp4'

#

and there ar equite a few of these. but i beleive tehse are to be deleted videos

#

yeah this is botched

#

half of hte videos are not showing (playing)

#

so my dads folder in /library did get removed it seems

#

😭 😭 😭

wintry hatch
#

If it's from a phone then perhaps a re-upload?

jovial flame
#

i will have to wait for ihm to get back and check

#

could be he deleted them becasue he thought it was now backed up

#

idk how this has happened, how foolders have now randomly been removed and deleted

wintry hatch
#

Do you perhaps backup your proxmox VMs?

jovial flame
#

would have been nice to do that wouldnt it ....

#

but these are mounts

#

so even if i backuped my vm, remember, my UPLOAD location is a MOUNT

#

either way even with a VM backup, once i updated immich something happeend and it deleted the folders in the MOUNT

wintry hatch
#

It probably was never mounted in the first place

#

Then those folders get made inside the container

jovial flame
#

no it was `100%

#

ahjhhh

#

no

#

if i set my upload location to mnt/immich-library (whic hsi my mount )

wintry hatch
#

I thought it was /mnt/immich-library?

jovial flame
#

then if it makes a new folder inside that mount, then thats on the MOUNT right, if my library is in /mnt/immich-library/library then it has the names of the users and all the pics in there, that means when it created the folder thats in the MOUTN

#

so immich created a folder in that lets say DAD

#

immich has now somehow deleted that DAD folder ?

wintry hatch
#

immich doesn't delete any strange folders

jovial flame
#

ive alos just noticed

#

ther eis no storage label for my dads account

wintry hatch
#

At best it just says "untracked folder/files"

jovial flame
#

ok, so it seems my mums account is no issue, there is alabel of her name in there and the folder in /library is there so i believe hers is fine

#

my dads does not have a label, and im 99% sure iput one in

#

and the error when hovering and trying to play a video on his account says /upload/library/randomnumbers/bla.mp4

wintry hatch
#

Yeah randomnumbers are the default storage label

#

(user id)

jovial flame
#

how are pictures still ok, is this because it has made the thumbnail thats why

wintry hatch
#

Yep, try to download it

jovial flame
#

nope

#

doesnt exist

#

bloody hell

#

right right right how do i fix this now. so first thing first is create a label for my dads account yes

#

then i need to go n my dads phone and reuplaod eveyrthing

wary flare
#

The first thing to do is setup real actual backups. You’re taking a lot of responsibility with your family files and no good backup plan

jovial flame
#

core backup are on a seprate HDD so im backuped twice, the only non backuped pictures are the ones on the phone to immich

#

my old methodology was every few months i would create a folder in my big hdd array, with the date of the backup, dump all pics, and then attach my external HDD and then abck that up again

#

those older pics are now added to immich as external libraries, so all my external libaries are in a good backup practise

#

the only thing at risk is the pictures on the phones that havent been backedup yet

tame raven
#

That is everything but a good backup practice

#

In every regard

viscid flameBOT
#

So when people say "x is not a backup tool" what they are actually saying is "you probably don't actually want a single point in time copy of your data", which is what that tool is doing.

And that "backup tools" exist today that:

  • can run on a schedule
  • only copy new/changed data (incremental)
    keep track of changes over time in the backup, with the option to restore to a previous version

This gives you the ability to recover a file that was deleted some time ago, restore to a point prior to data corruption, etc., all while being space efficient (similar blocks are deduplicated)

Popular backup tools are restic and borg.

tame raven
jovial flame
#

that was the plan, i should ahe backedup the libary folder befoer doign the update

tame raven
#

You can't just say "hey you can upload the pics from your phone to Immich" - and then not back those up

tame raven
#

Completely unrelated

jovial flame
#

ok, i should have automatic updates of my /library folder

#

but i did not expect this to now be randomly deleted. might not be immich, might not be the mounts, dont really know what has happened. I think im still good they should still have all pics on board. Now lets talk about how to restore immich and I will also defintely make sure I setup a prooper backup job for my libary folders

#
  1. create strage label on my dads account
#
  1. from his phone upload pictures again
#
  1. once done, backup /library folder immediately and then look to setup automatic backups
tame raven
#
  1. make sure all folders are properly mounted right now
jovial flame
#

folders are mounted via NFS, they are all showing up as mounted correctly

jovial flame
#

hi again, so ive managed to take a look at his phone and luckly he has the pictures on there still. Now when i done a bacup of all assets on his phone i believe immich sees that the picture is stilll backedup on the server (as there are thumbnails on it) but as the immage/video is actually not present it ofcourse can be downloaded or played. What could i do to fix this ?

#

Im thinking to delete that number folder libary that it claims to be there (this does not exist, the only folder that exists now is his name

tame raven
#

You actually need to go ahead and delete them from the database

#

Which isn't trivial in your case tbh

jovial flame
tame raven
#

(Mraedis any simple ideas?)

jovial flame
#

isnt ther esome sql type viewer for this that i can use maybe

wintry hatch
tame raven
#

But I don't really feel comfortable bulk deleting assets monakS

wintry hatch
#

If the phone upload is the only thing in there straight up deleting the user might work 👀

jovial flame
#

well can we not just tell teh DB to delete the 57afXXXXXXXX total ?

tame raven
#

You should even be able to do that from the UI

#

And it should figure out cascades

jovial flame
#

so deleting the user will that laso delete hte libary associated with it ?

tame raven
#

Yeah it'll clean it all up

jovial flame
#

oki, going to deelete that, then create a user with the same email, then add the external libaries to him again then add label and re upload it all

tame raven
#

Sounds like a plan that might work :)