I
Immich2w ago
Sib

Migrating from TrueNAS Scale 24.10 to 25.04.2.4 - Directory in a mess

Hi, I recently upgraded to TrueNAS 25.04 so I will be having to migrate my data to the new database and reinstall Immich. Think is, and I warn you. During initial installation (which was on TrueNas 22 I believe) I placed everything in the same directory 🙃 (It was functional so I never bothered looking at it). I know what steps I have to take to do the migration, but I can't seem to decipher the original folder structure. My help question then is, does anyone know which files belong where? (uploads, library, pgData, ect.) Again ⚠️ Be warned! Big mess! Does anyone know which of these files belong where? I attached a screenshot of the original setup as well. *See my other message To orientate: 1acb...4e2cf & 6ece...c8fb contains my images (two accounts) - Where should these be located? (upload, library?) pg_ directories & postresql.conf - Which of these should go into pgData? immich_2024....sql - Seems like these are no longer in use as the latest is from 2024-11-23 (My instance last ran last week) Further I found directories in /mnt/flash/ix-applications/releases/immich/volumes/ix_volumes (library, pgBackup, pgData, profile, thumbs, uploads, video) however these are all empty and also shouldn't been in use looking at my Storage Configuration. Is this salvageable or am I just better off to start from scratch and sync my devices again? Any help would be appreciated :)
No description
44 Replies
Immich
Immich2w ago
:wave: Hey @Sib, 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:
Sib
SibOP2w ago
Accidentally uploaded the same attachment twice, see Storage Configuration here:
No description
Xiticks
Xiticks2w ago
Hello! I will see if I can try to help you with that tomorrow (it's 1:30 am for me now)
Sib
SibOP2w ago
No problem, thanks for taking the time
Xiticks
Xiticks2w ago
In the meantime If you do not have a backup of your data, make one I think it is fixable but I rather be sure you have a backup
Sib
SibOP2w ago
No worries, I've got one 👍
Xiticks
Xiticks2w ago
Sorry had no time today Can you tell me on which timezone you're in? and maybe when you're available?
Sib
SibOP2w ago
GMT+2 I'll be available from 16:30 if that's possible for you
Xiticks
Xiticks2w ago
Hi, sorry I forgot to ask yesterday But I think that you could try to salvage that is some ways (not 100% sure it will work) What I would do is switch from your "old data structure" to the new one
Xiticks
Xiticks2w ago
So like in the link, you create 2 new datasets In the data dataset you'll have to manually create each folder so
sudo mkdir backups encoded-video library upload profile thumbs
sudo mkdir backups encoded-video library upload profile thumbs
Inside each of these folder you create a .immich file with the command
sudo touch .immich
sudo touch .immich
After that you'll have to copy your upload folders
sudo rsync -a --info=progress2 /mnt/TANK/old_immich/1acb...4e2cf /mnt/TANK/new_immich/data/upload/
sudo rsync -a --info=progress2 /mnt/TANK/old_immich/1acb...4e2cf /mnt/TANK/new_immich/data/upload/
you do it for both all other are postgres related folders/files I think so you can do
sudo rsync -a --info=progress2 --exclude /mnt/TANK/old_immich/6ece...c8fb --exclude /mnt/TANK/old_immich/1acb...4e2cf /mnt/TANK/old_immich/* /mnt/TANK/new_immich/pgData/
sudo rsync -a --info=progress2 --exclude /mnt/TANK/old_immich/6ece...c8fb --exclude /mnt/TANK/old_immich/1acb...4e2cf /mnt/TANK/old_immich/* /mnt/TANK/new_immich/pgData/
Then you might have to reaply the ACL on both datasets For each: Permissions -> Edit -> Tick the 3 Boxes "apply owner", "apply group" and "apply permissions recursively" (there will be a warning, just confirm" Then click on Apply acl (or something like that, it's the big blue button) Then edit your Immich app, untick the old storage structure and with the new one point data to your data dataset on hostpath and same for postgres point it to pgData
Sib
SibOP2w ago
No worries
Xiticks
Xiticks2w ago
If there is anything you don't understand or need more help, ping me!
Sib
SibOP2w ago
I will, thanks a lot!
Xiticks
Xiticks2w ago
And that is just a "guess" for a solution, so it might not work directly, there might be some stuff to modify/adapt, so lmk
Sib
SibOP2w ago
Yeah so fyi, rsync kept ignoring the exlcude, so I ended up cd'ing into the old directory and did
sudo rsync -a --info=progress2 --exclude='6ece...c8fb' --exclude='1acb...4e2cf' /mnt/TANK/old_immich/* /mnt/TANK/new_immich/pgData/
sudo rsync -a --info=progress2 --exclude='6ece...c8fb' --exclude='1acb...4e2cf' /mnt/TANK/old_immich/* /mnt/TANK/new_immich/pgData/
*with my actual directory names
Xiticks
Xiticks2w ago
oh yeah my command was maybe wrong as long as you found something that works, that is fine
Sib
SibOP2w ago
Yeah, I though it was the syntax but even being in the root directory and using the full path didn't work. I don't know why But no worries
Xiticks
Xiticks2w ago
tbh I used the exlude flag 2 times so I though it would have worked the way I showed, but it seems not 😄
Sib
SibOP2w ago
That's the thing, you should be able to use it twice It's currently installing, and I'm heading of I'll give an update tomorrow Thanks a lot
Sib
SibOP2w ago
Well, I guess I need to figure out what the old password was
No description
Xiticks
Xiticks2w ago
Not needed Keep the app running and run this command in terminal
sudo docker exec -it ix-immich-temp-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
sudo docker exec -it ix-immich-temp-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
Sib
SibOP2w ago
which terminal?
No description
Xiticks
Xiticks2w ago
TrueNAS shell and replace new_secure_password with the one you put in Immich DB
Sib
SibOP2w ago
No description
Xiticks
Xiticks2w ago
oh wait mb
Sib
SibOP2w ago
ix-immich-pgvecto-1 then?
Xiticks
Xiticks2w ago
coppied a bad command yyeah I modified it when I helped someone else
Sib
SibOP2w ago
Do I need to restart it now, or keep it running?
Xiticks
Xiticks2w ago
sudo docker exec -it ix-immich-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
sudo docker exec -it ix-immich-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
Try to connect to immich if it does'nt work, restart werll, restart anyway to be sure
Sib
SibOP2w ago
No description
Sib
SibOP2w ago
Positive or negative?
Xiticks
Xiticks2w ago
Mmmh, that doesn't seem right
Sib
SibOP2w ago
nvm I messed up it's on ixvolume
Xiticks
Xiticks2w ago
wdym? You did not set db to the host path where you copied all database fodlers?
Sib
SibOP2w ago
No description
Sib
SibOP2w ago
yes
Xiticks
Xiticks2w ago
oh yeah, that explains it
Sib
SibOP2w ago
No description
Xiticks
Xiticks2w ago
Yes Sorry So you have to upgrade to 1.132.3 first and after that transtion to latest
Sib
SibOP2w ago
I'll give that a shot
Xiticks
Xiticks2w ago
I'll post a guide tomorrow but I think I helped multiple people alraady you have to convert your app to a custom app and change the version number, as well as probably the data
Sib
SibOP2w ago
Thanks a lot for the help man

Did you find this page helpful?