DB restore was not successfully. So i tried to upgrade to “master” with:
yunohost app upgrade immich -F -b -c -u https://github.com/YunoHost-Apps/immich_ynh/tree/master
But doesn’t work: https://paste.yunohost.org/raw/uxanuhasin
So next try, after deinstall:
yunohost app install https://github.com/YunoHost-Apps/immich_ynh/tree/master -f --no-remove-on-failure
The systemd services can’t start:
==> /var/log/immich/immich-server.log <==
(node:74937) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:817
errored(Errors.postgres(parseError(x)))
^
PostgresError: password authentication failed for user "immich"
at ErrorResponse (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:817:22)
at handle (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:489:6)
at Socket.data (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:324:9)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28P01',
file: 'auth.c',
line: '329',
routine: 'auth_failed'
}
Node.js v24.12.0
Then i tried to install the last pre-postgres-17 version, think it’s: GitHub - YunoHost-Apps/immich_ynh at 444c6c4fb729038f54c72a567008079e31cc83fd · GitHub
so i ran:
yunohost app install https://github.com/YunoHost-Apps/immich_ynh/tree/444c6c4fb729038f54c72a567008079e31cc83fd -f --no-remove-on-failure
but it ends in:
...
Info: DEBUG - ++ cat /etc/yunohost/psql
Info: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=********** psql --cluster=16/main '' '--command=CREATE DATABASE immich;'
Info: WARNING - ERROR: database "immich" already exists
Info: DEBUG - + ynh_exit_properly
Error: The installation of immich failed, but was not cleaned up as requested by --no-remove-on-failure.
So i tried to upgrade with:
yunohost app upgrade immich -F -b -c -u https://github.com/YunoHost-Apps/immich_ynh/tree/444c6c4fb729038f54c72a567008079e31cc83fd
The in worked.
Trying to restore a backup in maintenance results in error:
Error: /usr/lib/postgresql/16/bin/psql non-zero exit code (2)
ERROR: current user cannot be dropped
ERROR: cannot drop role postgres because it is required by the database system
ERROR: role "immich" already exists
ERROR: role "postgres" already exists
\connect: connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "immich"
connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "immich"
After exit the maintenance mode, the services is broken in a endless retry mode, because of this error:
==> /var/log/postgresql/postgresql-16-main.log <==
2026-03-14 22:20:45.270 UTC [122819] immich@immich FATAL: password authentication failed for user "immich"
2026-03-14 22:20:45.270 UTC [122819] immich@immich DETAIL: Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 125: "host all all 127.0.0.1/32 scram-sha-256"
==> /var/log/immich/immich-server.log <==
/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:817
errored(Errors.postgres(parseError(x)))
^
PostgresError: password authentication failed for user "immich"
at ErrorResponse (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:817:22)
at handle (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:489:6)
at Socket.data (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:324:9)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28P01',
file: 'auth.c',
line: '331',
routine: 'auth_failed'
}
Node.js v24.14.0
Try to use the restore script results in:
root@YunoHost:/home/yunohost.app/immich/backups# bash restore_immich_db_backup.sh
1) immich-db-backup-20260301T020000-v2.2.3-pg16.13.sql.gz 6) immich-db-backup-20260306T020000-v2.2.3-pg16.13.sql.gz 11) immich-db-backup-20260311T020000-v2.2.3-pg16.13.sql.gz
2) immich-db-backup-20260302T020000-v2.2.3-pg16.13.sql.gz 7) immich-db-backup-20260307T020000-v2.2.3-pg16.13.sql.gz 12) immich-db-backup-20260312T020000-v2.2.3-pg16.13.sql.gz
3) immich-db-backup-20260303T020000-v2.2.3-pg16.13.sql.gz 8) immich-db-backup-20260308T020000-v2.2.3-pg16.13.sql.gz 13) immich-db-backup-20260313T020000-v2.2.3-pg16.13.sql.gz
4) immich-db-backup-20260304T020000-v2.2.3-pg16.13.sql.gz 9) immich-db-backup-20260309T020000-v2.2.3-pg16.13.sql.gz 14) immich-db-backup-20260314T020000-v2.2.3-pg16.13.sql.gz
5) immich-db-backup-20260305T020000-v2.2.3-pg16.13.sql.gz 10) immich-db-backup-20260310T020000-v2.2.3-pg16.13.sql.gz 15) restore-point-immich-db-backup-20260314T221912-v2.5.6-pg16.13.sql.gz
Select backup file to restore, or 0 to exit:14
You select "immich-db-backup-20260314T020000-v2.2.3-pg16.13.sql.gz".
To proceed we are going to:
1) stop immich
2) drop the curent database
3) restore the databse with the selected backup
4) restart immich
Are you sure you want to continue restoring? [y/N] y
[+...................] Stopping immich...
[#+..................] Droping current immich db...
ERROR: database "immich" does not exist
I just tweak the script and deactivate myynh_drop_psql_db and myynh_create_psql_db then the SQL dump restore starts…
After restore the server can’t start because of this errors:
==> /var/log/postgresql/postgresql-16-main.log <==
2026-03-14 22:46:28.895 UTC [127432] immich@immich ERROR: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist
2026-03-14 22:46:28.895 UTC [127432] immich@immich STATEMENT: ALTER TABLE "album_asset" RENAME CONSTRAINT "album_asset_albumsId_fkey" TO "album_asset_albumId_fkey";
==> /var/log/immich/immich-server.log <==
Query failed : {
durationMs: 1.162200999999186,
error: PostgresError: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist
at ErrorResponse (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:815:30)
at handle (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:489:6)
at Socket.data (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:324:9)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '42704',
file: 'pg_constraint.c',
line: '889',
routine: 'get_relation_constraint_oid'
},
sql: 'ALTER TABLE "album_asset" RENAME CONSTRAINT "album_asset_albumsId_fkey" TO "album_asset_albumId_fkey";',
params: []
}
[Nest] 127386 - 03/14/2026, 10:46:28 PM WARN [Microservices:DatabaseRepository] Migration "1761755618862-FixColumnNames" failed
[Nest] 127386 - 03/14/2026, 10:46:28 PM ERROR [Microservices:DatabaseRepository] Migrations failed: PostgresError: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist
PostgresError: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist
at ErrorResponse (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:815:30)
at handle (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:489:6)
at Socket.data (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:324:9)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '42704',
file: 'pg_constraint.c',
line: '889',
routine: 'get_relation_constraint_oid'
}
microservices worker error: PostgresError: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist, stack: PostgresError: constraint "album_asset_albumsId_fkey" for table "album_asset" does not exist
at ErrorResponse (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:815:30)
at handle (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:489:6)
at Socket.data (/var/www/immich/immich/app/node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/cjs/src/connection.js:324:9)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
Seems it’s this: v2.3.1 Update fail-loop, no booting & usable anymore · Issue #24037 · immich-app/immich · GitHub and discussion here: v2.3.1 Update fail-loop, no booting & usable anymore · immich-app/immich · Discussion #24042 · GitHub So migrations are missing?!?