Server Migration

Hello, I've had Immich setup before, but due to my boot drive failing, I've had to switch over to a new server. I know the wiki here (https://immich.app/docs/administration/backup-and-restore) says to back everything up via docker exec, but I don't have access to that anymore.
I have everything setup in one directory, /pool/immich, which contains the directories library, library-cache, and postgres. So, with some basic thinking, I assume that I can just make sure the password is the same as the old install and just CP over the /pool/immich/postgres Or is everything slightly more involved than that?
16 Replies
Immich
Immich5mo ago
:wave: Hey @thecodingchicken, 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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: 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.
Zeus
Zeus5mo ago
If the data is fully intact that should work fine Make sure to retain permissions when copying
thecodingchicken
thecodingchickenOP5mo ago
I've had to change a couple of things as I've changed my current system, and immich is now running inside a vm where I have some different services running.
The database is setup correctly, but it doesn't want to actually load any files, and right now it can't startup due to Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich The log is full of many repeated copies of this(attached message.txt) the line that confuses me is line 63, microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information." First of all, why doesn't it expand UPLOAD_LOCATION, as it is a valid variable in the docker container(see image). And secondly, after following that wiki page it links to, it appears like the file doesn't exist or something, which, even after I created it to debug, still behaves as if it doesn't exist.
Zeus
Zeus5mo ago
Please follow the second link. Your setup is wrong in many ways You need to move each old folder into that newly mounted folder as wwll
thecodingchicken
thecodingchickenOP5mo ago
gotcha, thanks I don't know what I was doing back when I first set this up, and clearly I don't now as well followed the second link, fixed both .env and docker-compose.yml still getting that error message
immich_server | [Nest] 7 - 12/29/2024, 6:30:42 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
immich_server | microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
immich_server | [Nest] 7 - 12/29/2024, 6:30:42 PM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
immich_server | microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
if I have to, I can just start fresh and re-import everything, but I'd rather not as I have multiple users and about 500 gigs of stuff right now may be the easiest solution
Zeus
Zeus5mo ago
please post the following new compose new env output of tree -L 2 inside every folder on your host that currently contains immich content
thecodingchicken
thecodingchickenOP5mo ago
(Renamed .env to .env.txt for discord) The first tree
chicken@androidstuff:~/immich-app$ tree -L 2
.
├── docker-compose.yml
├── dump.sql.gz
├── immich-config.json
└── postgres [error opening dir]

2 directories, 3 files
chicken@androidstuff:~/immich-app$ tree -L 2
.
├── docker-compose.yml
├── dump.sql.gz
├── immich-config.json
└── postgres [error opening dir]

2 directories, 3 files
The second tree
chicken@androidstuff:~/immich$ tree -L 2
.
├── library
│   ├── encoded-video
│   ├── library
│   ├── profile
│   ├── thumbs
│   └── upload
└── library-cache

8 directories, 0 files
chicken@androidstuff:~/immich$ tree -L 2
.
├── library
│   ├── encoded-video
│   ├── library
│   ├── profile
│   ├── thumbs
│   └── upload
└── library-cache

8 directories, 0 files
miknzau
miknzau4mo ago
I have just done a migration and am seeing exact same error -
ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
could it be a recent code change, as I have done successful server migrations before.
Tempest
Tempest4mo ago
Are you changing immich versions?
miknzau
miknzau4mo ago
No, same version v 1.123.0 to v v1.123.0
thecodingchicken
thecodingchickenOP4mo ago
Huh interesting. I'm considering trying to fix my migrated version as this current one has a bunch of problem pictures, including this one which was recent.
No description
miknzau
miknzau4mo ago
Yes a bit co-incedental both of us seeing this error on a recent migration
thecodingchicken
thecodingchickenOP3mo ago
something to note. my vm that I ran immich in got restarted, and now it's broken again. quite confused may just have to re-install immich and hope it works this time. quite weird, given that it worked all of January
Tempest
Tempest3mo ago
Sounds like your mounts aren't properly working
thecodingchicken
thecodingchickenOP3mo ago
Update, server crashed again. had to fix some apparmor file that broke it. upon starting back up, it works 🪄 and broke another vm. I think my current problems are way outside immich

Did you find this page helpful?