#Urgent Help Needed: Unable to Read Photos After Immich Docker Upgrade (v1.143.1 → v2.5.5)

1 messages · Page 1 of 1 (latest)

grim crag
#

Hello Developers,

I encountered issues while upgrading Immich via Docker (from v1.143.1 to v2.5.5) and faced multiple errors. Later, I realized that a direct upgrade wasn’t possible. So, after saving the “library” files from v1.143.1, I performed a fresh installation of v2.5.5. However, after registering a new account, I am unable to access the photo information from v1.143.1. I tried restoring the backed-up database (immich-db-backup-1769911200035.sql.gz), but the restore failed with the following error:

Error: /usr/lib/postgresql/14/bin/psql non-zero exit code (3)
ERROR: DROP DATABASE cannot run inside a transaction block

Therefore, restoring from the backup seems unworkable.

I suspect the issue may be related to differences in IDs, which could be preventing access to the data. I would like to know if it’s possible to modify my ID or if there are alternative methods to recover my data.

Please note that this message was translated using translation software—I apologize if any part comes across as unclear or impolite.

Thank you in advance for your assistance!

last fieldBOT
#

:wave: Hey @grim crag,

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.

last fieldBOT
gritty sparrow
#

Direct upgrade from 1.143.2 to 2.5.5 is definitely possible so I would look at fixing your old install before going anywhere.

#

What was your old compose?

grim crag
# gritty sparrow Direct upgrade from 1.143.2 to 2.5.5 is definitely possible so I would look at f...

Hello Developers,

I have already removed the old Immich installation and only kept the library folder from v1.143.1.

I ran the initial error logs through an AI analysis, and this is the feedback I received:

“You encountered a database migration error (Invalid upgrade path) when starting Immich v1.143.1. The root cause is that when Immich migrated from TypeORM to the Kysely database framework, your upgrade path did not meet the official requirements, causing the initial migration (InitialMigration) to fail.”

Since the old database and installation are gone, and the backup restoration also failed, I’m stuck with my photos in the library folder but no way to access them in v2.5.5.

Is there any way to recover my data at this point?
Can I manually import the photos from the old library folder into the new Immich instance?
Or is there a way to rebuild the database from the existing asset files?

gritty sparrow
#

You still have UPLOAD_LOCATION/backups do you not? @grim crag

grim crag
gritty sparrow
#

Are you following the proper restore procedure?

grim crag
gritty sparrow
#

You should set IMMICH_VERSION=v1.143.2 in your .env and do a CLI restore https://docs.v1.143.1.archive.immich.app/administration/backup-and-restore/#manual-backup-and-restore

A 3-2-1 backup strategy is recommended to protect your data. You should keep copies of your uploaded photos/videos as well as the Immich database for a comprehensive backup solution. This page provides an overview on how to backup the database and the location of user-uploaded pictures and videos. A template bash script that can be run as a cron...

grim crag
gritty sparrow
#

The one you had before, docs arent refreshed for minor version bumps so there is no 143.2 doc

grim crag
gritty sparrow
#

Your full compose please

gritty sparrow
#

You are usingdocker-compose not docker compose? Is this an old machine>

#

Please note that the compose for 143 can be found here:
https://github.com/immich-app/immich/releases/download/v1.143.1/docker-compose.yml

It includes:

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:c44be5f2871c59362966d71eab4268170eb6f5653c0e6170184e72b38ffdf107
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always

Which is quite different from what you use

#

I am going to assume this is due to the Kysely migration though, which means you never used any image from around 133 to 136

#

I'm not sure you can downgrade to 132 at this point 🤔

#

Could you show docker exec immich_postgres psql -U postgres -d immich -c 'select version, "createdAt" from version_history'

@grim crag

grim crag
grim crag
gritty sparrow
#

That's a wild shot away from 141

grim crag
gritty sparrow
#

Yes

#

And there is a clean upgrade path to v2/latest from 143, but if you're starting from 129 you need to pass these breaking changes first

grim crag
# gritty sparrow And there is a clean upgrade path to v2/latest from 143, but if you're starting...

Hello Developers,

With the help of AI, I pulled v1.129.0 from the official website but it failed to run. I also tried v1.130.0 and it also failed. The AI has no more solutions and suggested I send this information to you for assistance.
Cannot restore v1.129.0 backup on iStoreOS - all v1.129.0/v1.130.0 images fail to start

Environment

  • OS: iStoreOS (OpenWrt based), x86_64
  • Docker: 20.10.22
  • Target: Restore backup from v1.129.0

What I tried

  1. Official ghcr.io v1.129.0 → /usr/local/bin/node: cannot execute binary file
  2. Official ghcr.io v1.130.0 → same binary error
  3. linkease/immich-server:v1.129.0 → start.sh deprecated, container restart loop
  4. linkease/immich-server:v1.143.1 → backup incompatible (migration error)

Full diagnostic info

gritty sparrow
#

Please stop relying onAI, you just need to check the actual github releases page for the releases I mentioned earlier and use the docker compose listed on the assets of that release

grim crag
gritty sparrow
#

Storage Template Migration only if you have enabled it just now, "Migration" is very old and you were well beyond the version that needs it

#

There is no harm in running the jobs regardless

grim crag
gritty sparrow
#

Are there any people on the web?

grim crag
gritty sparrow
grim crag
gritty sparrow
#

Why are you in /albums

grim crag
gritty sparrow
grim crag
gritty sparrow
#

Can you post your current compose file and the immich_server and immich_machine_learning logs

grim crag
gritty sparrow
#

It looks like your ML container can't download the model from huggingface

grim crag
gritty sparrow
#

Yes, but you have to download them from there so I don't see how that would work?

#

here is an example of what it might look like:

/var/lib/docker/volumes/immich_model-cache/_data# tree -L3
.
├── clip
│   └── ViT-B-32__openai
│       ├── config.json
│       └── models--immich-app--ViT-B-32__openai
├── facial-recognition
│   └── buffalo_l
│       ├── detection
│       ├── models--immich-app--buffalo_l
│       ├── README.md
│       └── recognition
└── ocr
    └── PP-OCRv5_mobile
        ├── detection
        └── recognition
grim crag
gritty sparrow
#

I would personally go with the install on device, copying the files is always a hassle

grim crag