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
Pouvez vous m’aider à restaurer cette sauvegarde svp ?
You select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.sql.gz”.
To proceed we are going to:
stop immich
drop the curent database
restore the databse with the selected backup
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
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:
stop immich
drop the curent database
restore the databse with the selected backup
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.
Remplace le contenu de restore_immich_db_backup.sh par :
#!/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
You select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.sql.gz”.
To proceed we are going to:
stop immich
drop the curent database
restore the databse with the selected backup
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
ou select “immich-db-backup-20260228T020000-v2.5.6-pg16.12.sql.gz”.
To proceed we are going to:
stop immich
drop the curent database
restore the databse with the selected backup
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
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
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)