Server Migration - ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich:
I have migrated my Windows immich instance from an old to a new PC. The setup on the old pc was that ALL files related to immich were on dedicated external hard drive. d:
I followed the steps on this page. https://immich.app/docs/administration/backup-and-restore (windows / powershell tab)
Everything went totally smoothly, yet I couldn't load immich in the web browser, a look in the immich server logs has:
It seems to my novice eye that the code is looking for the folder "encoded-video" in the "upload" folder, yet to my knowledge it has never been there.
39 Replies
:wave: Hey @miknzau,
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
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
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. :ballot_box_with_check: 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.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:I followed the steps on this page. https://immich.app/docs/administration/backup-and-restore (windows / powershell tab)
Steps taken:
1. Successfully created a DB dump, on the old machine, with the immich instance running.
2. Closed immich, closed Docker, removed hard drive.
3. Installed hard drive on new machine and ensured same drive letter d:
4. Installed docker on new machine
5. Again commenced following https://immich.app/docs/administration/backup-and-restore (windows/PowerShell restore part)
6. Needed to copy the dump.sql file into the docker postgres server volume (you should possibly add that step to the doc for windows users, as docker/WSL can't see the dump file in the windows file system)
7. Docker compose down -v (success)
8. Docker compose pull (success)
9. Docker compose create (success)
10. Docker start immich_postgres (success)
waited 10 secs and jumped into Docker terminal via
11. ran - success
12. exit (back to Powershell)
13. Docker compose up -d (success)
So everything went totally smoothly, yet I couldn't load immich in the web browser, a look in the immich server logs has:
It seems to my novice eye that the code is looking for the folder "encoded-video" in the "upload" folder, yet to my knowledge it has never been there.
Please see the video here for the PowerShell session https://drive.google.com/file/d/11bbv9sAavklmISsHuopVEnT39jcQ6ar8/view?usp=sharing (ignore me miss-typing dump as dummp - lol)
Google Docs
1-jan-2025-immich-troubleshoot.mp4
It's because upload location does not refer to the library/upload folder but the library folder. Which itself is pretty confusingly named because there also is a library/library folder
But these are mapped in the app to /usr/src/app/upload/(upload|library) to complete the circle of confusion
I'm still remote on my phone so this explanation is the best I can do right now š¶āš«ļø
Ok, can wait for further analysis, although I want to stress that I have never altered any standard out of the box settings, so for the backup / restore to not work then possibly the documentation is missing a step? Also, as an FYI, I ran "storage template migration" and "migration" jobs with success on the installation before doing the DB dump.
Any further thoughts on this issue?
Why do you say this?
oh I see now. it's the issue of the folder mapping
basically what has happened is you are either missing files from your restore or have the mount points messed up
please post your full docker compose and .env
I have only ever used standard default versions of these files (with nessesary changes when breaking changes on updates required them to be modified)
please post the screenshot of the contents of the folder the docker-compose is in, and also the contents of the ./immich folder


ok and what's in encoded-video ?

my assumption is that
./immich
does not work on windows
perhaps you need ot provide the full path
we don't really support/recommend windows for many reasons similar to this
like D:\immich
I have been running this version on the preivious pc fine though??
with this actual disk too
sorry but windows and docker is sort of cursed, that's my best guess though
in fact yesterday i put this physical disk back in the old pc and immich is still running on that box fine!
it tends to work fine until it fails badly
makes no sense, I have done successful server migration once before.
but htat was several versions ago (like maybe 6 months ago)
sorry, not sure what else to say but that we see issues like this all the time
you can certainly keep debugging and trying stuff and maybe someone else has an idea
so working back from the error message... "Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich" is <UPLOAD_LOCATION> which location
would you say that is d:/immich in my setup?
that is correct
ok and the file is clearly there
hmmm
yes but you need to take care for a few things, first of all
/
vs \
on windows
also if a root drive may be required, I am not sure, like D:
but as I say, it is working perfectly on the previous machine, same drive same env same docker-compose
so the issue isn't docker, or windows.
I can promise you the issue is not immich haha
what it does is very simple. look for the presence of a file and open it in write mode
docker and windows does wayyyy more stuff that can go wrong, and regularly does go wrong on windows specifically
There is one other ticket with this exact error on server migration, so that might offer some clues too
got it, best of luck
ok so just to be sure, I just now unmounted the D drive from the new server, plugged it back into the old server (both windows 11) and my immich is running fine still on the old server, using the same disk. So for sure something in the migration must be the issue

Why are you running docker compose up from the immich folder..?
Whats in that folder?

Youre meant to run docker compose commands from the folder containing the compose.yaml file
So idk why / how that works. Maybe more windows oddities
Either way this basically confirms its a deployment or host OS issue, not immich. As a docker comtainer immich knows nothing about its environment

so yeah it works from d:\ as well
ok so running docker on the new machine with NO drive d present, the errors in immich server log are the same, this suggests docker ain't seeing drive D at all maybe.. Interesting clue.
where can I see the paths / mounts that this installation of immich "thinks" assets are?
Ok I got a large clue by the fact the error was the same when the disk was not present. So I took the disk back to the orig setup - ran immich. confirmed it was all working fine again.. Then took it to the new machine, made no changes, ran compose up and it voila - working fine..
Thanks to everyone - can mark this as resolved.
Sounds like you didnāt even have to change anything. Interesting haha
I literally didn't š
Hi! Iām new to basically everything so sorry for taking up your time, but Iām having the same error on Linux Ubuntu. I have my upload folder on another partition which didnāt mount automatically. My problems started after a reboot (and connecting my computer to a router, I was previously running without one [well I said I was new didnāt I?]). Iām very new to all of this, but did you basically just restart the container with the ācompose downā and then ācompose upā commands? Not at my computer but looking for things to try when I get home.
I have changed in settings so that the partition now mounts after reboot but it didnāt solve my problem. I also changed permission on the upload folder to user but it didnāt help.
You always have to restart the container if mounts change @nooonji compose down/up will do fine
Thank you for your help! This did unfortunately not resolve my issue but a reinstall did. I noticed that my file path to my mounted partition had changed so Iām guessing that was what caused my issue.