Immich: MàJ 1.140.1~ynh1 à 1.141.1~ynh1

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.1.20
How are you able to access your server: The webadmin
SSH

Describe your issue

Bonjour,

Il m’est impossible de faire la dernière mise à jour.
Je n’ai pas de fichier de log à partager, mais l’erreur que j’ai à l’écran, que je vous partage ci-dessous.

De plus, je viens de remarquer que mes sauvegardes locales ont disparues, alors que j’en avais depuis plusieurs mois (5 sauvegardes de 150 à 300Go environ).
“Sauvegardes / local
Il n’y a aucune sauvegarde.”

Merci pour votre future aide.
Bien à vous,
Gérard

Share relevant logs or error messages

YunoHost a rencontré une erreur interne
Vraiment désolé de cela.
Vous devez chercher de l’aide sur le forum ou le chat pour corriger la situation, ou signaler le bug sur le bugtracker.
Les informations suivantes peuvent être utiles à la personne qui vous aide :
Erreur: “500” Internal Server Error

Action: “PUT” /yunohost/api/apps/immich/upgrade

Message d’erreur :
Aborting the upgrade, because a safety backup could not be created (Échec de la collecte des fichiers à sauvegarder)

Pendant le traitement de l’action, le serveur a dit :

Collecte des fichiers devant être sauvegardés pour immich…
Declaring files to be backed up…
File or folder ‘/var/www/immich’ to be backed up does not exist
Échec de la collecte des fichiers à sauvegarder pour immich.

N’y aurait-il pas un problème de droit sur “/home/yunohost.backup/” ?
Je demande car je n’ai pas accès au SSH pour le moment …

Le dossier n’existe réelement pas ? Peux-tu verifier avec sudo -alih /var/www/immich ?

en effet, le dossier n’existe pas.

cd /var/www/immich
-bash: cd: /var/www/immich: Aucun fichier ou dossier de ce type

You can update to 12.1.22 and try again?

Mise a jour faite, toujours le même problème …

Bon bah ca c’est pas la meilleure nouvelle…
On va encore tenter un truc pour éviter le plus complexe. peux-tu lancer l’upgrade sans faire de backup avec sudo yunohost app upgrade immich -u https://github.com/YunoHost-Apps/immich_ynh --no-safety-backup ?

sudo yunohost app upgrade immich -u GitHub - YunoHost-Apps/immich_ynh: Self-hosted photo and video backup solution directly from your mobile phone. --no-safety-backup
==========

  • Assurez-vous que l’application mobile et le serveur sont sur la même version. Dans le cas contraire vous risquez de ne pas pouvoir accèder à l’application.

  • Le processus d’installation nécessite suffisemment de mémoire vive libre pour aboutir. Un fichier swap sera créé si nécessaire.
    ==========
    AVERTISSEMENT : Vous devriez vérifier les notifications de l’application susmentionnée avant de continuer, il pourrait y avoir des
    informations importantes à connaître. [Press enter to continue]:
    Info : Mise à jour de immich…
    Attention : Skipping the creation of a backup prior to the upgrade.
    Info : Updating sources…
    Info : Updating system_user…
    Info : Updating install_dir…
    Info : Updating data_dir…
    Info : Updating permissions…
    Attention : Vous ne pouvez pas activer ‘show_tile’ pour le moment, car vous devez d’abord définir une URL pour l’autorisation ‘immich.main’
    Info : Updating ports…
    Info : Updating apt…
    Info : Updating database…
    Info : [+…] > Checking hardware requirements…
    Info : [#++…] > Stopping immich’s systemd service…
    Info : [###+…] > Ensuring downward compatibility…
    Info : [####++…] > Upgrading source files…
    Info : ‘/var/www/immich/source’ wasn’t deleted because it doesn’t exist.
    Info : [######+…] > Installing nodejs…
    Info : [#######++…] > Udpating a PostgreSQL database…
    Info : [#########+…] > Temporary adding additional swap if needed…
    Attention : swapoff: /swap_immich : échec de swapoff: Argument invalide
    Erreur : Impossible de mettre à jour immich : Une erreur s’est produite durant l’exécution du script de mise à jour de l’application
    Info : L’opération ‘Mettre à jour l’application ‘immich’’ a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande ‘yunohost log share 20250910-204321-app_upgrade-immich’
    Attention : Here’s an extract of the logs before the crash. It might help debugging the error:
    Info : DEBUG - pg_terminate_backend
    Info : DEBUG - ----------------------
    Info : DEBUG - (0 ligne)
    Info : DEBUG -
    Info : DEBUG - + sudo --login --user=postgres dropdb immich
    Info : DEBUG - + ynh_psql_user_exists immich
    Info : DEBUG - + local user=immich
    Info : DEBUG - + sudo --login --user=postgres psql -tAc ‘SELECT rolname FROM pg_roles WHERE rolname=’'‘immich’'‘;’
    Info : DEBUG - + grep --quiet immich
    Info : DEBUG - + ynh_psql_drop_user immich
    Info : DEBUG - + sudo --login --user=postgres psql
    Info : DEBUG - DROP ROLE
    Info : INFO - [#########+…] > Temporary adding additional swap if needed…
    Info : DEBUG - + myynh_add_swap
    Info : DEBUG - + ynh_del_swap
    Info : DEBUG - + ‘[’ -e /swap_immich ‘]’
    Info : DEBUG - + sed -i ‘/swap added by immich/d’ /etc/fstab
    Info : DEBUG - + swapoff /swap_immich
    Info : WARNING - swapoff: /swap_immich : échec de swapoff: Argument invalide
    Info : DEBUG - + ynh_exit_properly
    Erreur : L’opération ‘Mettre à jour l’application ‘immich’’ a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande ‘yunohost log share 20250910-204321-app_upgrade-immich’

J’ai une bonne nouvelle sur mes deux problèmes, J’ai récupéré mes sauvegardes, c’était mon SSD externe qui n’était pas reconnu quand j’ai rebooté le serveur …

bon on y est presque encore sudo rm -f /swap_immich et ensuite relancer sudo yunohost app upgrade immich -u https://github.com/YunoHost-Apps/immich_ynh --no-safety-backup

C’est en cours mais c’est bloqué depuis 20 minutes …

sudo yunohost app upgrade immich -u GitHub - YunoHost-Apps/immich_ynh: Self-hosted photo and video backup solution directly from your mobile phone. --no-safety-backup
==========

  • Assurez-vous que l’application mobile et le serveur sont sur la même version. Dans le cas contraire vous risquez de ne pas pouvoir accèder à l’application.

  • Le processus d’installation nécessite suffisemment de mémoire vive libre pour aboutir. Un fichier swap sera créé si nécessaire.
    ==========
    AVERTISSEMENT : Vous devriez vérifier les notifications de l’application susmentionnée avant de continuer, il pourrait y avoir des
    informations importantes à connaître. [Press enter to continue]:
    Info : Mise à jour de immich…
    Attention : Skipping the creation of a backup prior to the upgrade.
    Info : Updating sources…
    Info : Updating system_user…
    Info : Updating install_dir…
    Info : Updating data_dir…
    Info : Updating permissions…
    Info : Updating ports…
    Info : Updating apt…
    Info : Updating database…
    Info : [+…] > Checking hardware requirements…
    Info : [#++…] > Stopping immich’s systemd service…
    Info : [###+…] > Ensuring downward compatibility…
    Info : [####++…] > Upgrading source files…
    Info : ‘/var/www/immich/source’ wasn’t deleted because it doesn’t exist.
    Info : [######+…] > Installing nodejs…
    Info : [#######++…] > Udpating a PostgreSQL database…
    Info : [#########+…] > Temporary adding additional swap if needed…
    Info : [##########++…] > Making install…
    Info : [############+…] > Remove temporary swap if added…
    Info : [#############++…] > Updating immich’s configuration files…
    Info : [###############+…] > Upgrading system configurations related to immich…
    Info : The service fail2ban has correctly executed the action reload-or-restart.
    Info : [################++..] > Starting immich’s systemd service…
    Info : The service immich-machine-learning has correctly executed the action start.
    Attention : (this may take some time)

La suite en erreur …

Attention : (this may take some time)
Attention : The service immich-server didn’t fully executed the action start before the timeout.
Attention : Please find here an extract of the end of the log of the service immich-server:
Attention : sept. 10 23:51:59 systemd[1]: immich-server.service: Main process exited, code=exited, status=1/FAILURE
Attention : sept. 10 23:51:59 systemd[1]: immich-server.service: Failed with result ‘exit-code’.
Attention : sept. 10 23:51:59 systemd[1]: immich-server.service: Consumed 10.116s CPU time.
Attention : sept. 10 23:51:59 systemd[1]: immich-server.service: Scheduled restart job, restart counter is at 133.
Attention : sept. 10 23:51:59 systemd[1]: Stopped immich-server.service - Immich server.
Attention : sept. 10 23:51:59 systemd[1]: immich-server.service: Consumed 10.116s CPU time.
Attention : sept. 10 23:52:00 systemd[1]: Started immich-server.service - Immich server.
Attention : sept. 10 23:52:05 systemd[1]: immich-server.service: Main process exited, code=exited, status=1/FAILURE
Attention : sept. 10 23:52:05 systemd[1]: immich-server.service: Failed with result ‘exit-code’.
Attention : sept. 10 23:52:05 systemd[1]: immich-server.service: Consumed 10.095s CPU time.
Attention : sept. 10 23:52:05 systemd[1]: immich-server.service: Scheduled restart job, restart counter is at 134.
Attention : sept. 10 23:52:05 systemd[1]: Stopped immich-server.service - Immich server.
Attention : sept. 10 23:52:05 systemd[1]: immich-server.service: Consumed 10.095s CPU time.
Attention : sept. 10 23:52:06 systemd[1]: Started immich-server.service - Immich server.
Attention : sept. 10 23:52:12 systemd[1]: immich-server.service: Main process exited, code=exited, status=1/FAILURE
Attention : sept. 10 23:52:12 systemd[1]: immich-server.service: Failed with result ‘exit-code’.
Attention : sept. 10 23:52:12 systemd[1]: immich-server.service: Consumed 10.211s CPU time.
Attention : sept. 10 23:52:12 systemd[1]: immich-server.service: Scheduled restart job, restart counter is at 135.
Attention : sept. 10 23:52:12 systemd[1]: Stopped immich-server.service - Immich server.
Attention : sept. 10 23:52:12 systemd[1]: immich-server.service: Consumed 10.211s CPU time.
Attention : ===
Attention : at Readable.push (node:internal/streams/readable:392:5)
Attention : at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
Attention : severity_local: ‘FATAL’,
Attention : severity: ‘FATAL’,
Attention : code: ‘28P01’,
Attention : file: ‘auth.c’,
Attention : line: ‘331’,
Attention : routine: ‘auth_failed’
Attention : }
Attention : microservices worker error: PostgresError: authentification par mot de passe échouée pour l’utilisateur « immich », stack: PostgresError: authentification par mot de passe échouée pour l’utilisateur « immich »
Attention : at ErrorResponse (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
Attention : at handle (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
Attention : at Socket.data (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
Attention : at Socket.emit (node:events:519:28)
Attention : at addChunk (node:internal/streams/readable:561:12)
Attention : at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
Attention : at Readable.push (node:internal/streams/readable:392:5)
Attention : at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
Attention : microservices worker exited with code 1
Attention : Killing api process
Erreur : Impossible de mettre à jour immich : Une erreur s’est produite durant l’exécution du script de mise à jour de l’application
Info : L’opération ‘Mettre à jour l’application ‘immich’’ a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande ‘yunohost log share 20250910-213306-app_upgrade-immich’
Attention : Here’s an extract of the logs before the crash. It might help debugging the error:
Info : WARNING - at ErrorResponse (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
Info : WARNING - at handle (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
Info : WARNING - at Socket.data (/var/www/immich/app/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
Info : WARNING - at Socket.emit (node:events:519:28)
Info : WARNING - at addChunk (node:internal/streams/readable:561:12)
Info : WARNING - at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
Info : WARNING - at Readable.push (node:internal/streams/readable:392:5)
Info : WARNING - at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
Info : WARNING - microservices worker exited with code 1
Info : WARNING - Killing api process
Info : DEBUG - + ‘[’ start == reload ‘]’
Info : DEBUG - + ‘[’ start == start ‘]’
Info : DEBUG - + _ynh_clean_check_starting
Info : DEBUG - + ‘[’ -n 17727 ‘]’
Info : DEBUG - + kill -SIGTERM 17727
Info : DEBUG - + ‘[’ -n /tmp/tmp.MHheAPw4m1 ‘]’
Info : DEBUG - + ynh_safe_rm /tmp/tmp.MHheAPw4m1
Info : DEBUG - + local target=/tmp/tmp.MHheAPw4m1
Info : DEBUG - + return 1
Info : DEBUG - + ynh_exit_properly
Erreur : L’opération ‘Mettre à jour l’application ‘immich’’ a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande ‘yunohost log share 20250910-213306-app_upgrade-immich’

On avance, reste la connexion à la base de données…
Peux-tu vérifier que les mots de passe donnés par les 2 commandes suivantes sont les mêmes ?
sudo cat /etc/yunohost/apps/immich/settings.yml | grep psql_pwd | cut -d' ' -f2
et
sudo cat /var/www/immich/env | grep DB_PASSWORD | cut -d'=' -f2

Je ne peux pas dans la journée, je suis au boulot et je n’ai pas accès à mon PC local (ma faute, je ne l’ai pas rebranché ce matin). :innocent: :face_savoring_food:
Je regarde ce soir en rentrant vers 20h00 et je te tien informé.

En attendant, je te remercie énormément pour ton aide. :star_struck:

ce sont bien les mêmes.

Le plus simple sera une restauration si tu as ca sous la main

Je n’ai malheureusement pas de backup, car il ne s’est pas fait suite au plantage.

ok bon on va se tenter de réparer ca… le chemin risque d’être laborieux, mais à cœur vaillant…
Commencons par vérifier l’état de la base de donnée de immich avec 2 commandes dont j’aimerais voir le résultat :

  • LC_ALL=C sudo --login --user=postgres psql --cluster="16/main" --command="SELECT rolname,rolpassword FROM pg_authid where rolname='immich';"
  • LC_ALL=C sudo --login --user=postgres psql --cluster="16/main" --dbname=immich --command="SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';"

Bon, j’ai fais une bourde.
J’ai voulu remettre une sauvegarde IMMICH d’une grosse sauvegarde que j’avais fait il y à quelques semaine.
J’ai supprimé celle qui ne fonctionnait plus pour remettre la sauvegarde en place, sauf que j’ai eu un message d’erreur : le fichier JSON n’existe pas, la sauvegarde n’a pas pu être restaurée.

Je n’ai pas pu faire la restauration, donc plus rien, obligé de réinstaller IMMICH en cession d’origine.

Il y a quelque chose à faire pour récupérer les anciennes photos avec l’ancienne base ?

As tu essayé la restoration depuis la ligne de commande ?