# Echec de mise à jour de Immich

**URL:** https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722
**Category:** Support apps
**Tags:** immich, french, restore-backup
**Created:** [March 2, 2026, 9:08pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722 "2026-03-02T21:08:35Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 2, 2026, 9:08pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/1 "2026-03-02T21:08:35Z")

</div>

**What app is this about, and its version** : Immich 2.5.6~ynh1  
**What YunoHost version are you running** : 12.1.39  
**What type of hardware are you using** : Old laptop or computer

### Describe your issue

Suite à la mise à jour de immich de 2.5.6~ynh1 vers 2.5.6~ynh5, il y a eu une erreur à l’installation et le service immich s’est arrêté.  
J’ai tenté de réinstaller la version2.5.6~ynh5 à nouveau mais immich s’est complètement desinstallé avec les 20 ans de photos de toute ma famille.  
Je tente de restaurer la sauvegarde que j’ai réalisée juste avant la mise à jour mais j’ai là aussi une erreur : [https://paste.yunohost.org/raw/avefaxokal](https://paste.yunohost.org/raw/avefaxokal)  
Pouvez vous m’aider à restaurer cette sauvegarde svp ?

### Share relevant logs or error messages

[https://paste.yunohost.org/raw/avefaxokal](https://paste.yunohost.org/raw/avefaxokal)

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 2, 2026, 9:32pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/2 "2026-03-02T21:32:00Z")

</div>

Pas d’inquiétude rien n’est perdu.  
Le plus simple est de réinstaller en suivant ça : [Restauration immich impossible après échec de l'upgrade - #2 by ewilly](https://forum.yunohost.org/t/restauration-immich-impossible-apres-echec-de-lupgrade/41025/2)

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 2, 2026, 10:40pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/3 "2026-03-02T22:40:41Z")

</div>

Malheureusement, ça a échoué

> You select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.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…  
> [##+…] Creating an empty immich db…  
> restore\_immich\_db\_backup.sh: ligne 49: myynh\_create\_psql\_db : commande introuvable

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 3, 2026, 6:57am UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/4 "2026-03-03T06:57:13Z")

</div>

J’ai corrigé le script ici [https://raw.githubusercontent.com/YunoHost-Apps/immich\_ynh/refs/heads/testing/conf/restore\_immich\_db\_backup.sh](https://raw.githubusercontent.com/YunoHost-Apps/immich_ynh/refs/heads/testing/conf/restore_immich_db_backup.sh)  
PS : je n’ai pas eu l’occasion de le tester donc dis-moi s’il fonctionne ou retourne un message d’erreur

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 3, 2026, 8:58pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/5 "2026-03-03T20:58:06Z")

</div>

Bonsoir, malheureusement l’execution du script a échoué à nouveau :

> You select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.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…  
> /usr/lib/postgresql/17/bin/psql: unrecognized option ‘–cluster= **DB\_CLUSTER** ’  
> psql: hint: Try “psql --help” for more information.

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 3, 2026, 9:06pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/6 "2026-03-03T21:06:49Z")

</div>

Remplace le contenu de `restore_immich_db_backup.sh` par :

```auto
#!/bin/bash

source /etc/yunohost/apps/immich/scripts/_common.sh
YNH_HELPERS_VERSION="2.1" source /usr/share/yunohost/helpers

YNH_STDINFO=1
backup_files=( *.sql.gz )

PS3="Select backup file to restore, or 0 to exit:"
select backup_file in "${backup_files[@]}"
do
	if [[$REPLY == "0"]]
	then
		ynh_print_info "[####################] Bye!"
		exit
	elif [[-z $backup_file]]; then
        ynh_print_info "[....................] Invalid choice, try again"
	else
		break
	fi
done

cat << EOF

You select "$backup_file".

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

EOF

read -r -p "Are you sure you want to continue restoring? [y/N] " response
if [["$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
	app="immich"
	db_cluster="17/main"
	db_name="immich"

	ynh_print_info "[+...................] Stopping immich..."
	ynh_systemctl --service="$app-server" --action="stop"

	ynh_print_info "[#+..................] Droping current immich db..."
	myynh_drop_psql_db 1>/dev/null

	ynh_print_info "[##+.................] Creating an empty immich db..."
	if [[$(lsb_release --codename --short) = "bookworm"]]
	then
		myynh_provision_postgresql 1>/dev/null
	fi
	myynh_update_psql_db 1>/dev/null

	ynh_print_info "[###++++++++++++++++.] Restoring immich db backup... (Depending on your database size, this may take a long while)"
	{
		gunzip --stdout "$backup_file" > "db.sql"
		myynh_restore_psql_db
		ynh_safe_rm "db.sql"
		set +o xtrace
	} &>/dev/null

	ynh_print_info "[###################+] Restarting immich..."
	ynh_systemctl --service="$app-server" --action="start"

	ynh_print_info "[####################] Restoration of the immich db backup completed!"
else
	ynh_print_info "[####################] Bye!"
fi

```

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 3, 2026, 9:10pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/7 "2026-03-03T21:10:00Z")

</div>

echec

> You select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.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…  
> ERREUR: la base de données « immich » n’existe pas

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 3, 2026, 10:04pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/8 "2026-03-03T22:04:39Z")

</div>

ah bah oui la base a déjà été “droppée” à la première tentative  
Il doit suffire de commenter la ligne 47 ainsi :  
`# myynh_drop_psql_db 1>/dev/null`

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 3, 2026, 10:10pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/9 "2026-03-03T22:10:49Z")

</div>

caramba, encore raté

> ou select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.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…  
> [##+…] Creating an empty immich db…  
> /etc/yunohost/apps/immich/scripts/\_common.sh: ligne 303: YNH\_DEBIAN\_VERSION : variable sans liaison

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 4, 2026, 9:38pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/10 "2026-03-04T21:38:53Z")

</div>

> [@ShultZ](#):
>
> YNH\_DEBIAN\_VERSION

try to define that in the script with `YNH_DEBIAN_VERSION=$(lsb_release --codename --short)` just in a line after `db_name="immich"`

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 4, 2026, 9:59pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/11 "2026-03-04T21:59:00Z")

</div>

Ca avance

> 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…  
> [##+…] Creating an empty immich db…
> 
> - return 0
> - LC\_ALL=C
> - DEBIAN\_FRONTEND=noninteractive
> - apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/immich.list
> - touch /etc/apt/sources.list.d/immich.list
> - ynh\_apt\_install\_dependencies ‘libpq5 libpq-dev postgresql-17 postgresql-17-pgvector postgresql-client-17’  
> ++ sed ‘s/([^\<=\>])\ ([^(])/\1, \2/g’  
> ++ sed ‘s/|/ | /’
> - local ‘dependencies=libpq5, libpq-dev, postgresql-17, postgresql-17-pgvector, postgresql-client-17’  
> ++ ynh\_read\_manifest version  
> ++ cat /home/yunohost.app/immich/manifest.toml  
> ++ toml\_to\_json  
> ++ python3 -c ‘import toml, json, sys; print(json.dumps(toml.load(sys.stdin)))’  
> ++ jq .version --raw-output  
> cat: /home/yunohost.app/immich/manifest.toml: Aucun fichier ou dossier de ce type
> - local version=null
> - local app\_ynh\_deps=immich-ynh-deps
> - grep ‘[\<=\>]’  
> ++ grep -oP ‘(?\<=php)[0-9.]+(?=-|\>|)’  
> ++ sort -u
> - local specific\_php\_version=
> - [[-n ‘’]]
> - grep --quiet php  
> ++ \_ynh\_apt\_package\_is\_installed postgresql-15  
> ++ local package=postgresql-15  
> ++ dpkg-query --show ‘–showformat=${db:Status-Status}’ postgresql-15  
> ++ grep --quiet ‘^installed$’  
> ++ echo yes
> - local psql\_installed=yes
> - [[true == \t\r\u\e]]
> - YNH\_APT\_INSTALL\_DEPENDENCIES\_REPLACE=false  
> ++ mktemp --directory
> - local TMPDIR=/tmp/tmp.tymU7XvykK
> - mkdir -p /tmp/tmp.tymU7XvykK/immich-ynh-deps/DEBIAN
> - chmod -R 755 /tmp/tmp.tymU7XvykK/immich-ynh-deps
> - cat
> - \_ynh\_apt update
> - [[update == \u\p\d\a\t\e]]
> - local aptcache=/var/cache/apt/pkgcache.bin
> - sleep 1
> - [[-e /var/cache/apt/pkgcache.bin]]  
> ++ find /var/cache/apt/pkgcache.bin -mmin -30
> - [[-n /var/cache/apt/pkgcache.bin]]  
> ++ find /etc/apt/ -newer /var/cache/apt/pkgcache.bin
> - [[-z /etc/apt/sources.list.d/immich.list]]
> - \_ynh\_wait\_dpkg\_free
> - local try
> - set +o xtrace
> - return 0
> - LC\_ALL=C
> - DEBIAN\_FRONTEND=noninteractive
> - apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
> - \_ynh\_wait\_dpkg\_free
> - local try
> - set +o xtrace
> - return 0
> - LC\_ALL=C
> - dpkg-deb --build /tmp/tmp.tymU7XvykK/immich-ynh-deps /tmp/tmp.tymU7XvykK/immich-ynh-deps.deb
> - cat /tmp/tmp.tymU7XvykK/dpkg\_log  
> dpkg-deb: error: parsing file ‘/tmp/tmp.tymU7XvykK/immich-ynh-deps/DEBIAN/control’ near line 4 package ‘immich-ynh-deps’:  
> ‘Version’ field value ‘null’: version number does not start with digit
> - ynh\_die ‘Unable to install dependencies’
> - set +o xtrace  
> Unable to install dependencies

---

<div class="post-metadata">

### Author: ![ewilly](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ewilly/32/12681_2.png) [@ewilly](https://forum.yunohost.org/u/ewilly)
#### Post date: [March 6, 2026, 5:49pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/12 "2026-03-06T17:49:59Z")

</div>

Bon trop complexe de mettre à jour ce script à la mano.  
Il est réparé dans la dernière version de immich 15.6~ynh7 sinon j’ai testé et ça a fonctionné il y a tout simplement l’outil intégré à immich pour restaurer un database (dans le menu administration / maintenance)

---

<div class="post-metadata">

### Author: ![ShultZ](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/47e85d/32.png) [@ShultZ](https://forum.yunohost.org/u/ShultZ)
#### Post date: [March 6, 2026, 7:02pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/13 "2026-03-06T19:02:08Z")

</div>

Merci, merci, merci, merci, merci

Tout remarche

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [March 21, 2026, 7:02pm UTC](https://forum.yunohost.org/t/echec-de-mise-a-jour-de-immich/41722/14 "2026-03-21T19:02:51Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
