#Importing or recover old Immich install Truenas/ Hexos

1 messages · Page 1 of 1 (latest)

random citrus
#

Immich was unable to update to the new version for a few months. I decided to reinstall Immich assuming that it would be an easy reinstall.
I uninstalled it via the HexOs dashboard. I installed it again via Truenas and using the existing uploads path and postgres path.
It is unable to find Immich while using the old port.
It is also showing that it is Deploying every minute ish.

wooden wedgeBOT
#

:wave: Hey @random citrus,

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. :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.

wooden wedgeBOT
umbral coral
#

can you show the dataset structure ?
As well as the immich config

#

My bet would be

  1. Upgrading from a too old version without applying the breaking changes
  2. Error pointing to the correct datasets
random citrus
#

With data structure are you referring to this?

umbral coral
#

yeah, so there is already one issue there

#

Do you remember which Immich version you were on before trying to upgrade?

random citrus
#

V1.9.2 I think. I am not sure if the .2 is correct

umbral coral
#

That's TrueNAS version

random citrus
umbral coral
#

You don't have any info about the Immich version?

random citrus
#

I don't remember but I know that I had the problem with not being able to update for a couple of months. Probably since late August or early September

#

Let me check all the notifications in hexos. maybe that mentions the old version

umbral coral
#

but it was up to date before that right?

#

If so, that's one less issue to deal with 😄

#

Using Truenas shell, can you also share
ls -la /mnt/HDDs/immich/uploads

random citrus
#

yeah, before that I was able to update immich normally

umbral coral
random citrus
#

truenas_admin@NAS0Vellekoop[~]$ ls -la /mnt/HDDs/immich/uploads
ls: cannot access '/mnt/HDDs/immich/uploads': No such file or directory
truenas_admin@NAS0Vellekoop[~]$ ls -la /mnt/HDDs/Applications/immich/uploads
total 43
drwxrwx--- 5 root root 6 Dec 26 2024 .
drwxrwx--- 7 root root 7 Dec 22 2024 ..
-rwxrwx--- 1 root root 13 Oct 26 09:00 .immich
drwxrwx--- 258 root root 258 Dec 23 2024 4e831468-efae-46d3-9e81-6fc47292736e
drwxrwx--- 258 root root 258 Dec 30 2024 7fa6eb51-552d-477f-b439-68a3171a1a02
drwxrwx--- 258 root root 258 Jan 11 2025 bf3ea691-dcf2-4ef5-b4af-7f0506faa273
truenas_admin@NAS0Vellekoop[~]$

umbral coral
#

Ok, so to explain what's the error, the "uploads" dataset you pointed immich to correspond to the "upload" folder, not the "data" folder immich use, which cause the issue

#

Can you also do
sudo ls -la /mnt/.ix-apps/app_mounts/immich

random citrus
#
[sudo] password for truenas_admin: 
total 42
drwxr-xr-x  4 root    root    4 Oct 27 06:18 .
drwxr-xr-x  8 root    root    8 Sep  8 12:28 ..
drwxr-xr-x  2 root    root   17 Oct 27 02:01 backups
drwx------ 20 netdata docker 26 Oct 27 06:39 postgres_data```
umbral coral
#

postgres_data
Why do you also have the dataset on the HDD/.../immich? Did you create it?

random citrus
#

Idk maybe could have been created in my effort to restore immich

umbral coral
#

oh ok, we'll see that later

#

so what you have to do is
0) stop immich

  1. go into the uploads dataset
    sudo su
    cd /mnt/HDDs/Applications/immich/uploads
    Then you have to create an upload folder
    mkdir upload
    after which you move all except upload to upload
    find . -mindepth 1 -maxdepth 1 ! -name 'upload' -exec mv -t ./upload {} +
#
  1. rsync all other datasets to your upload location
    sudo rsync -r --info=progress2 /mnt/HDDs/Applications/immich/encoded_videos/ /mnt/HDDs/Applications/immich/uploads/encoded-video/
    sudo rsync -r --info=progress2 /mnt/HDDs/Applications/immich/profile/ /mnt/HDDs/Applications/immich/uploads/profile/
    sudo rsync -r --info=progress2 /mnt/HDDs/Applications/immich/thumbs/ /mnt/HDDs/Applications/immich/uploads/thumbs/
    sudo rsync -r --info=progress2 /mnt/.ix-apps/app_mounts/immich/backups/ /mnt/HDDs/Applications/immich/uploads/backups/
#
  1. @random citrus Do you ever remember enabling the storage template in immich ?
random citrus
#

No

#

I don't think I have enabled that

#

should I be getting these error messages? I have only done the first command
20,355,904,495 92% 173.18MB/s 0:01:52 (xfr#726, to-chk=394/3670)rsync: [receiver] mkstemp "/mnt/HDDs/Applications/immich/uploads/encoded-video/bf3ea691-dcf2-4ef5-b4af-7f0506faa273/52/d8/.52d88db5-c9e8-417b-ab4b-0d61142c7011.mp4.nB2MBQ" failed: Operation not permitted (1) 20,444,923,065 92% 173.30MB/s 0:01:52 (xfr#727, to-chk=25/3670)rsync: [receiver] mkstemp "/mnt/HDDs/Applications/immich/uploads/encoded-video/bf3ea691-dcf2-4ef5-b4af-7f0506faa273/f3/e4/.f3e4017d-0aa7-4758-a2c0-c94cd6ec8917.mp4.opCczT" failed: Operation not permitted (1) 21,992,136,502 100% 177.02MB/s 0:01:58 (xfr#728, to-chk=0/3670) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]

umbral coral
#

I changed the letter, can you try again?

#

Every issue with HexOS I begin to hate their implem choices more and more

umbral coral
#

did this one worked?
find . -mindepth 1 -maxdepth 1 ! -name 'upload' -exec mv -t ./upload {} +

random citrus
#

first one is still in progress
root@NAS0Vellekoop[/mnt/HDDs/Applications/immich/uploads]# sudo rsync -r --info=progress2 /mnt/HDDs/Applications/immich/encoded_videos/ /mnt/HDDs/Applications/immich/uploads/encoded-video/
12,019,271,363 66% 97.29MB/s 0:01:57 (xfr#284, ir-chk=1002/2528)

#

no errors

umbral coral
#

Ok, run all the others then

#

Step 3 will be
mkdir /mnt/HDDs/Applications/immich/uploads/library/ && sudo touch /mnt/HDDs/Applications/immich/uploads/library/.immich

random citrus
#

the 3rd one is taking its sweet time, still progressing

umbral coral
#

Yes, lot of small files

#

HDDs don't like small file

random citrus
#

completed all steps

umbral coral
#

Ok, so can you now try to start immich again?

random citrus
#

it is in a faster deploying cycle. When the status is running, opening the web ui gives the error that it is not able to connect

#

the deploying cycle slowed down back to once a minute ish

umbral coral
#

can you check the immich logs?

#

On the server line, the third button

random citrus
umbral coral
#

Oh yes, you might not have set the same password for the database

#

sudo docker exec -it ix-immich-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"

#

Keep immich running and run this command in the terminal
new_secure_password replace this with the password you set in the database

random citrus
#

changed the password, also the one in the immich settings, no change in behaviour

umbral coral
#

so they match now?

#

Can you restart the app

#

and then share the logs

random citrus
#

Looks like the password error is gone. So that is at least some progress

umbral coral
#

sudo touch /mnt/HDDs/Applications/immich/uploads/encoded-video/.immich

random citrus
#

should I turn immich off before that?

umbral coral
#

No you can restart it

random citrus
#

made the file

umbral coral
#

can you do
ls -la /mnt/HDDs/Applications/immich/uploads/

random citrus
#

truenas_admin@NAS0Vellekoop[~]$ ls -la /mnt/HDDs/Applications/immich/uploads/
total 68
drwxrwx--- 8 root root 8 Oct 27 10:31 .
drwxrwx--- 7 root root 7 Dec 22 2024 ..
drwxrwx--- 2 root root 17 Oct 27 10:00 backups
drwxrwx--- 5 root root 6 Oct 27 08:01 encoded-video
drwxrwx--- 2 root root 3 Oct 27 10:31 library
drwxrwx--- 2 root root 3 Oct 27 08:06 profile
drwxrwx--- 5 root root 6 Oct 27 09:54 thumbs
drwxrwx--- 5 root root 6 Oct 27 07:54 upload

umbral coral
#

ls -la /mnt/HDDs/Applications/immich/uploads/encoded-video also

random citrus
#

truenas_admin@NAS0Vellekoop[~]$ ls -la /mnt/HDDs/Applications/immich/uploads/encoded-video
total 43
drwxrwx--- 5 root root 6 Oct 27 08:01 .
drwxrwx--- 8 root root 8 Oct 27 10:31 ..
-rwxrwx--- 1 root root 13 Oct 27 12:13 .immich
drwxrwx--- 257 root root 257 Oct 26 08:22 4e831468-efae-46d3-9e81-6fc47292736e
drwxrwx--- 229 root root 229 Apr 25 2025 7fa6eb51-552d-477f-b439-68a3171a1a02
drwxrwx--- 234 root root 234 Oct 6 06:38 bf3ea691-dcf2-4ef5-b4af-7f0506faa273

umbral coral
#

and show me the permission on the uploads file

#

dataset

random citrus
umbral coral
#

Is that the one on the uploads dataset?

random citrus
umbral coral
#

Wtf is that how was it working before xD

#

Can you click on the edit button then

#

And make it look like this

random citrus
#

It is loading, I will be afk for 20 minutes

random citrus
umbral coral
#

Have you

  1. REstarted the app again?
  2. Did you check the 3 boxes before applying the changes
  3. Have you added the apps user as shown in the screenshot?
random citrus
#

Looks like I used the wrong save button and didn't change anything

#

Am I missing something else?

Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.11/concurrent/futures/process.py", line 261, in process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem
/perm_check.py", line 122, in check_acl_execute_impl
raise CallError(
middlewared.service_exception.CallError: [EPERM] Filesystem permissions on path /mnt/HDDs/Applications/immich prevent access for user "apps" to the path /mnt/HDDs/Applications/immich/uploads. This may be fixed by granting the aforementioned user execute permissions on the path: /mnt/HDDs/Applications/immich.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 509, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 556, in run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1367, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1364, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 183, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 55, in nf
res = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem
/acl.py", line 890, in setacl
return self.setacl_nfs4(job, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem
/acl.py", line 597, in setacl_nfs4
self.middleware.call_sync(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1665, in call_sync
return methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem_/perm_check.py", line 256, in check_acl_execute
run_with_user_context(check_acl_execute_impl, {
File "/usr/lib/python3/dist-packages/middlewared/utils/user_context.py", line 55, in run_with_user_context
return exc.submit(func, *(func_args or [])).result()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
middlewared.service_exception.CallError: [EPERM] Filesystem permissions on path /mnt/HDDs/Applications/immich prevent access for user "apps" to the path /mnt/HDDs/Applications/immich/uploads. This may be fixed by granting the aforementioned user execute permissions on the path: /mnt/HDDs/Applications/immich.

umbral coral
#

Fckiong HexOS yes xD

#

can you show the perms on the immich dataset?

random citrus
umbral coral
random citrus
#

Enable this?

umbral coral
#

No

#

just the red button

#

Then edit and make it look like

umbral coral
#

on the uploads

random citrus
#

peepoAwesome Finally, I can log in again and looks like I have everything back. Now time to see if I can install tailscale and access immich outside my local network without borking it again. TYSM

umbral coral
#

Nice

#

So fyi, you can also remove all other datasets (encodedvide, provile and thumbs)

random citrus
#

You mean these? excluding postgres_data

umbral coral
#

and exluding uploads

random citrus
#

all without the 3x3 cubes

umbral coral
#

Exactly, as these are the 2 used by Immich

random citrus
#

that is some easy 50gb of storage being saved

umbral coral
#

Well they've been moved into upload so yes and no xD

random citrus
#

I hate to reopen this thread, but fricking hexos decided to need to reset all the settings before allowing me to update, I tried to apply all the steps again but I can not connect to the immich web ui

frail wolf
#

We recommend emailing hexos for support with this , or using their forum

#

As you can imagine it is both hard for us to fix things they keep breaking, and they need to be made aware of the issues so they can fix it

random citrus
#

Will do 👍

ionic tinsel
#

hey man, for mine hexos had created another instance of the app on my HDDs instead of my SSDs so I just rolled back from the truenas interface, rebooted then re-updated and it fixed it for me.

The HEXOS update had also changed the URL for another port and removed my domain as well but with this roll back it unfucked the doodoo hexos did

random citrus
random citrus