Hi everyone,
this is my first post here, I tried to use the search to find a similar topic but I could not find any. I apologize if there is a solution available already though.
#Issue
At the beginning of this year I set up a little home server running truenas and I installed Immich through the truenas applications UI.
It has been working fine so far and I have kept it up to date up to version 2.1.0, however the last update to 2.4.1 broke the database. I assume i should have migrated the database from Postgres 15 ot 18 while still on 2.10, however I didn’t.
My presumably fatal mistake took place when reverting, however, I didn’t really think and just picked the first option that truenas showed me. Apparently this was the first version of the database it had available as backup and not the latest before the upgrade so it reverted back to version 1.4.
Naturaly I would like to go to the latest version before the breaking update, however, truenas now only offers the option to go the the 2.4. version which will break again now with the following error on the pgvecto_upgrade container:
ERROR: Target version directory [/var/lib/postgresql/15/docker] already exists and is not empty, but PG_VERSION file not found.
This may indicate a partial/failed upgrade. Please investigate and remove/rename the existing directory.
With the normal UI methods I have apparently no way to choose to manually upgrade to each successive version. It seems there is a possibility to do this via a docker compose, since I have not done this yet I was trying to look into where to locate and change a docker compose for Truenas Applications. I didin’t really finde anythign that was immediatly helpful to me. Could someone explain if and how this would be possible or maybe point to an existing guide for this? I would be very thankful.
I do have weekly rsync backups to a cold storage of may data and database, so I’m not that afraid of loosing acutal data. I have also a running new immich version already with an empty database. I would of course re-immigrate the old data, but I would like to learn how to fix this stuff manually if possible, instead of doing it the wrong way around.
Another question would be, since I have database backups, is it possibly to import these to the new database somehow? Otherwise the backup would be kind of pointless, wouldn’t it?
Again, I would be very thankful for any help or pointers into the right direction.
Hope you all have a wonderful christmas time,
Cheers, Weggla