Upgrade broke Immich!

This worked, thanks!

I’ll leave my workaround here too:
I had to manually install the needed packages and after that I was able to upgrade Immich.

So i also had the error upgrading, and the app uninstalled itself. And i cannot restore from the backup the upgrade made, because it’s giving an error. So did i lost all my files? Where immich stores the files?

edit: i’ve found my data under /home/yunohost.app/immich/library/myuser. If i make a new install, will my data and preferences will be there?

I’ve no idea if a fresh install would delete that, do a backup of whatever you find first of all.

Logs ?

Upgrade log: https://paste.yunohost.org/raw/egezahamip
Restore log: https://paste.yunohost.org/raw/avudodogiz

Installing again does not delete my photos, but my immich instance is empty and i can’t import the files that are on that folder even if the user is the same of the old installation.
I think i have to download to my pc the folder with the photos, and the upload again to the new installation

With a fresh install the db is empty and there is no way to automatically recreate it from existing photos without reuploading them.
But… Did you active database backuping in immich? If you have db backup in /home/yunohost.app/immich/backups, you could certainly restore the db.

yes i have a db backup, how do i restore?

See here [solved] Immich crash and backup restore fails / update: db auth fails - #11 by ewilly
Let me know if that works :slight_smile:

Could you explain exactly what commands should i enter?

gunzip --stdout ../yunohost.app/immich/backups/immich-db-backup-1746921600012.sql.gz | sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" | sudo --login --user=postgres PGUSER=postgres PGPASSWORD="$(cat /etc/yunohost/psql)" psql --cluster="16/main" --dbname="immich"
Of course replace the backup filename with yours

well it gave plenty of errors


SET
SET
SET
ERROR:  cannot drop the currently open database
ERROR:  role "immich" cannot be dropped because some objects depend on it
DETAIL:  privileges for database immich
owner of table kysely_migrations
owner of table kysely_migrations_lock
owner of extension uuid-ossp
owner of function uuid_nil()
owner of function uuid_ns_dns()
owner of function uuid_ns_url()
owner of function uuid_ns_oid()
owner of function uuid_ns_x500()
owner of function uuid_generate_v1()
owner of function uuid_generate_v1mc()
owner of function uuid_generate_v3(uuid,text)
owner of function uuid_generate_v4()
owner of function uuid_generate_v5(uuid,text)
owner of extension unaccent
owner of function unaccent(regdictionary,text)
owner of function unaccent(text)
owner of function unaccent_init(internal)
owner of function unaccent_lexize(internal,internal,internal,internal)
owner of text search dictionary unaccent
owner of extension cube
owner of type cube
owner of function cube_in(cstring)
owner of function cube(double precision[],double precision[])
owner of function cube(double precision[])
owner of function cube_out(cube)
owner of function cube_eq(cube,cube)
owner of function cube_ne(cube,cube)
owner of function cube_lt(cube,cube)
owner of function cube_gt(cube,cube)
owner of function cube_le(cube,cube)
owner of function cube_ge(cube,cube)
owner of function cube_cmp(cube,cube)
owner of function cube_contains(cube,cube)
owner of function cube_contained(cube,cube)
owner of function cube_overlap(cube,cube)
owner of function cube_union(cube,cube)
owner of function cube_inter(cube,cube)
owner of function cube_size(cube)
owner of function cube_subset(cube,integer[])
owner of function cube_distance(cube,cube)
owner of function distance_chebyshev(cube,cube)
owner of function distance_taxicab(cube,cube)
owner of function cube_dim(cube)
owner of function cube_ll_coord(cube,integer)
owner of function cube_ur_coord(cube,integer)
owner of function cube_coord(cube,integer)
owner of function cube_coord_llur(cube,integer)
owner of function cube(double precision)
owner of function cube(double precision,double precision)
owner of function cube(cube,double precision)
owner of function cube(cube,double precision,double precision)
owner of function cube_is_point(cube)
owner of function cube_enlarge(cube,double precision,integer)
owner of operator >(cube,cube)
owner of operator >=(cube,cube)
owner of operator <(cube,cube)
owner of operator <=(cube,cube)
owner of operator &&(cube,cube)
owner of operator <>(cube,cube)
owner of operator =(cube,cube)
owner of operator <@(cube,cube)
owner of operator @>(cube,cube)
owner of operator ->(cube,integer)
owner of operator ~>(cube,integer)
owner of operator <#>(cube,cube)
owner of operator <->(cube,cube)
owner of operator <=>(cube,cube)
owner of function g_cube_consistent(internal,cube,smallint,oid,internal)
owner of function g_cube_penalty(internal,internal,internal)
owner of function g_cube_picksplit(internal,internal)
owner of function g_cube_union(internal,internal)
owner of function g_cube_same(cube,cube,internal)
owner of function g_cube_distance(internal,cube,smallint,oid,internal)
owner of operator family cube_ops for access method btree
owner of operator class cube_ops for access method btree
owner of operator family gist_cube_ops for access method gist
owner of operator class gist_cube_ops for access method gist
owner of function cube_recv(internal)
owner of function cube_send(cube)
owner of extension earthdistance
owner of function earth()
owner of type earth
owner of function sec_to_gc(double precision)
owner of function gc_to_sec(double precision)
owner of function ll_to_earth(double precision,double precision)
owner of function latitude(earth)
owner of function longitude(earth)
owner of function earth_distance(earth,earth)
owner of function earth_box(earth,double precision)
owner of function geo_distance(point,point)
owner of operator <@>(point,point)
owner of extension pg_trgm
owner of function set_limit(real)
owner of function show_limit()
owner of function show_trgm(text)
owner of function similarity(text,text)
owner of function similarity_op(text,text)
owner of operator %(text,text)
owner of function word_similarity(text,text)
and 112 other objects (see server log for list)
ERROR:  current user cannot be dropped
ERROR:  role "immich" already exists
ALTER ROLE
ERROR:  role "postgres" already exists
ALTER ROLE
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
UPDATE 1
DROP DATABASE
CREATE DATABASE
ALTER DATABASE
You are now connected to database "template1" as user "postgres".
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
COMMENT
ALTER DATABASE
You are now connected to database "template1" as user "postgres".
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
REVOKE
GRANT
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
ERROR:  database "immich" already exists
ALTER DATABASE
You are now connected to database "immich" as user "postgres".
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
ALTER DATABASE
You are now connected to database "immich" as user "postgres".
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
ERROR:  type "asset_visibility_enum" already exists
ALTER TYPE
ERROR:  type "assets_status_enum" already exists
ALTER TYPE
ERROR:  type "sourcetype" already exists
ALTER TYPE
ERROR:  function "album_asset_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "album_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "album_user_after_insert" already exists with same argument types
ALTER FUNCTION
ERROR:  function "album_user_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "asset_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "asset_face_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "asset_metadata_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "f_concat_ws" already exists with same argument types
ALTER FUNCTION
ERROR:  function "f_unaccent" already exists with same argument types
ALTER FUNCTION
ERROR:  function "immich_uuid_v7" already exists with same argument types
ALTER FUNCTION
ERROR:  function "ll_to_earth_public" already exists with same argument types
ALTER FUNCTION
ERROR:  function "memory_asset_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "memory_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "partner_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "person_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "stack_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "updated_at" already exists with same argument types
ALTER FUNCTION
ERROR:  function "user_delete_audit" already exists with same argument types
ALTER FUNCTION
ERROR:  function "user_metadata_audit" already exists with same argument types
ALTER FUNCTION
SET
SET
ERROR:  relation "activity" already exists
ALTER TABLE
ERROR:  relation "album" already exists
ALTER TABLE
COMMENT
ERROR:  relation "album_asset" already exists
ALTER TABLE
ERROR:  relation "album_asset_audit" already exists
ALTER TABLE
ERROR:  relation "album_audit" already exists
ALTER TABLE
ERROR:  relation "album_user" already exists
ALTER TABLE
ERROR:  relation "album_user_audit" already exists
ALTER TABLE
ERROR:  relation "api_key" already exists
ALTER TABLE
ERROR:  relation "asset" already exists
ALTER TABLE
ERROR:  relation "asset_audit" already exists
ALTER TABLE
ERROR:  relation "asset_exif" already exists
ALTER TABLE
ERROR:  relation "asset_face" already exists
ALTER TABLE
ERROR:  relation "asset_face_audit" already exists
ALTER TABLE
ERROR:  relation "asset_file" already exists
ALTER TABLE
ERROR:  relation "asset_job_status" already exists
ALTER TABLE
ERROR:  relation "asset_metadata" already exists
ALTER TABLE
ERROR:  relation "asset_metadata_audit" already exists
ALTER TABLE
ERROR:  relation "audit" already exists
ALTER TABLE
ERROR:  relation "audit_id_seq" already exists
ALTER SEQUENCE
ALTER SEQUENCE
ERROR:  relation "face_search" already exists
ALTER TABLE
ERROR:  relation "geodata_places" already exists
ALTER TABLE
ERROR:  relation "kysely_migrations" already exists
ALTER TABLE
ERROR:  relation "kysely_migrations_lock" already exists
ALTER TABLE
ERROR:  relation "library" already exists
ALTER TABLE
ERROR:  relation "memory" already exists
ALTER TABLE
ERROR:  relation "memory_asset" already exists
ALTER TABLE
ERROR:  relation "memory_asset_audit" already exists
ALTER TABLE
ERROR:  relation "memory_audit" already exists
ALTER TABLE
ERROR:  relation "migration_overrides" already exists
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER SEQUENCE
ALTER SEQUENCE
ERROR:  relation "move_history" already exists
ALTER TABLE
ERROR:  relation "naturalearth_countries" already exists
ALTER TABLE
ERROR:  column "id" of relation "naturalearth_countries" is already an identity column
ERROR:  relation "notification" already exists
ALTER TABLE
ERROR:  relation "partner" already exists
ALTER TABLE
ERROR:  relation "partner_audit" already exists
ALTER TABLE
ERROR:  relation "person" already exists
ALTER TABLE
ERROR:  relation "person_audit" already exists
ALTER TABLE
ERROR:  relation "session" already exists
ALTER TABLE
ERROR:  relation "session_sync_checkpoint" already exists
ALTER TABLE
ERROR:  relation "shared_link" already exists
ALTER TABLE
ERROR:  relation "shared_link_asset" already exists
ALTER TABLE
ERROR:  relation "smart_search" already exists
ALTER TABLE
ERROR:  relation "stack" already exists
ALTER TABLE
ERROR:  relation "stack_audit" already exists
ALTER TABLE
ERROR:  relation "system_metadata" already exists
ALTER TABLE
ERROR:  relation "tag" already exists
ALTER TABLE
ERROR:  relation "tag_asset" already exists
ALTER TABLE
ERROR:  relation "tag_closure" already exists
ALTER TABLE
ERROR:  relation "user" already exists
ALTER TABLE
ERROR:  relation "user_audit" already exists
ALTER TABLE
ERROR:  relation "user_metadata" already exists
ALTER TABLE
ERROR:  relation "user_metadata_audit" already exists
ALTER TABLE
ERROR:  relation "version_history" already exists
ALTER TABLE
ALTER TABLE
ALTER TABLE
COPY 0
ERROR:  insert or update on table "album" violates foreign key constraint "album_ownerId_fkey"
DETAIL:  Key (ownerId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
ERROR:  insert or update on table "album_asset" violates foreign key constraint "album_asset_albumsId_fkey"
DETAIL:  Key (albumsId)=(5998b5ab-5414-4e5f-b5eb-4c5cf5749c11) is not present in table "album".
COPY 0
COPY 0
COPY 0
COPY 0
COPY 0
ERROR:  insert or update on table "asset" violates foreign key constraint "asset_ownerId_fkey"
DETAIL:  Key (ownerId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
COPY 19
ERROR:  insert or update on table "asset_exif" violates foreign key constraint "asset_exif_assetId_fkey"
DETAIL:  Key (assetId)=(57c71c83-2611-4049-93d8-e2ab8a497b1d) is not present in table "asset".
ERROR:  insert or update on table "asset_face" violates foreign key constraint "asset_face_assetId_fkey"
DETAIL:  Key (assetId)=(cd64f1ec-828e-40c7-85fe-69db5a1238c6) is not present in table "asset".
COPY 0
ERROR:  insert or update on table "asset_file" violates foreign key constraint "asset_file_assetId_fkey"
DETAIL:  Key (assetId)=(4757a96d-cd9b-4fed-99f8-4d3f9508f57e) is not present in table "asset".
ERROR:  insert or update on table "asset_job_status" violates foreign key constraint "asset_job_status_assetId_fkey"
DETAIL:  Key (assetId)=(84749383-2bea-4105-98a1-332b19480e05) is not present in table "asset".
COPY 0
COPY 0
COPY 0
ERROR:  insert or update on table "face_search" violates foreign key constraint "face_search_faceId_fkey"
DETAIL:  Key (faceId)=(4b841f2f-2357-46f1-8e09-10bceb2701bb) is not present in table "asset_face".
ERROR:  duplicate key value violates unique constraint "geodata_places_pkey"
DETAIL:  Key (id)=(3038832) already exists.
CONTEXT:  COPY geodata_places, line 1
ERROR:  duplicate key value violates unique constraint "kysely_migrations_pkey"
DETAIL:  Key (name)=(1744910873969-InitialMigration) already exists.
CONTEXT:  COPY kysely_migrations, line 1
ERROR:  duplicate key value violates unique constraint "kysely_migrations_lock_pkey"
DETAIL:  Key (id)=(migration_lock) already exists.
CONTEXT:  COPY kysely_migrations_lock, line 1
COPY 0
ERROR:  insert or update on table "memory" violates foreign key constraint "memory_ownerId_fkey"
DETAIL:  Key (ownerId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
ERROR:  insert or update on table "memory_asset" violates foreign key constraint "memory_asset_memoriesId_fkey"
DETAIL:  Key (memoriesId)=(948a8ec3-e8bf-42d3-9954-d636889074a2) is not present in table "memory".
COPY 0
COPY 90
ERROR:  duplicate key value violates unique constraint "migration_overrides_pkey"
DETAIL:  Key (name)=(function_immich_uuid_v7) already exists.
CONTEXT:  COPY migration_overrides, line 1
COPY 200
COPY 0
ERROR:  duplicate key value violates unique constraint "naturalearth_countries_pkey"
DETAIL:  Key (id)=(1) already exists.
CONTEXT:  COPY naturalearth_countries, line 1
COPY 0
COPY 0
COPY 0
ERROR:  insert or update on table "person" violates foreign key constraint "person_ownerId_fkey"
DETAIL:  Key (ownerId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
COPY 0
ERROR:  insert or update on table "session" violates foreign key constraint "session_userId_fkey"
DETAIL:  Key (userId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
ERROR:  insert or update on table "session_sync_checkpoint" violates foreign key constraint "session_sync_checkpoint_sessionId_fkey"
DETAIL:  Key (sessionId)=(25660149-5bbe-410d-95ef-faf504eb86cd) is not present in table "session".
COPY 0
COPY 0
ERROR:  insert or update on table "smart_search" violates foreign key constraint "smart_search_assetId_fkey"
DETAIL:  Key (assetId)=(57c71c83-2611-4049-93d8-e2ab8a497b1d) is not present in table "asset".
COPY 0
COPY 0
ERROR:  duplicate key value violates unique constraint "system_metadata_pkey"
DETAIL:  Key (key)=(system-flags) already exists.
CONTEXT:  COPY system_metadata, line 1
COPY 0
COPY 0
COPY 0
ERROR:  duplicate key value violates unique constraint "user_email_uq"
DETAIL:  Key (email)=(valterbarreira@caixamagica.cloud) already exists.
CONTEXT:  COPY user, line 1
COPY 0
ERROR:  insert or update on table "user_metadata" violates foreign key constraint "user_metadata_userId_fkey"
DETAIL:  Key (userId)=(65f3f9ea-690b-4d0c-9860-b98c3c864ac8) is not present in table "user".
COPY 0
COPY 23
 setval 
--------
      8
(1 row)

 setval 
--------
    200
(1 row)

ERROR:  relation "public.naturalearth_countries_tmp_id_seq1" does not exist
LINE 1: SELECT pg_catalog.setval('public.naturalearth_countries_tmp_...
                                 ^
ALTER TABLE
ERROR:  relation "UQ_entityId_pathType" already exists
ERROR:  relation "UQ_newPath" already exists
ERROR:  multiple primary keys for table "activity" are not allowed
ERROR:  multiple primary keys for table "album_asset_audit" are not allowed
ERROR:  multiple primary keys for table "album_asset" are not allowed
ERROR:  multiple primary keys for table "album_audit" are not allowed
ERROR:  multiple primary keys for table "album" are not allowed
ERROR:  multiple primary keys for table "album_user_audit" are not allowed
ERROR:  multiple primary keys for table "album_user" are not allowed
ERROR:  multiple primary keys for table "api_key" are not allowed
ERROR:  multiple primary keys for table "asset_audit" are not allowed
ERROR:  multiple primary keys for table "asset_exif" are not allowed
ERROR:  multiple primary keys for table "asset_face_audit" are not allowed
ERROR:  multiple primary keys for table "asset_face" are not allowed
ERROR:  relation "asset_file_assetId_type_uq" already exists
ERROR:  multiple primary keys for table "asset_file" are not allowed
ERROR:  multiple primary keys for table "asset_job_status" are not allowed
ERROR:  multiple primary keys for table "asset_metadata_audit" are not allowed
ERROR:  multiple primary keys for table "asset_metadata" are not allowed
ERROR:  multiple primary keys for table "asset" are not allowed
ERROR:  multiple primary keys for table "audit" are not allowed
ERROR:  multiple primary keys for table "face_search" are not allowed
ERROR:  multiple primary keys for table "geodata_places" are not allowed
ERROR:  multiple primary keys for table "kysely_migrations_lock" are not allowed
ERROR:  multiple primary keys for table "kysely_migrations" are not allowed
ERROR:  multiple primary keys for table "library" are not allowed
ERROR:  multiple primary keys for table "memory_asset_audit" are not allowed
ERROR:  multiple primary keys for table "memory_asset" are not allowed
ERROR:  multiple primary keys for table "memory_audit" are not allowed
ERROR:  multiple primary keys for table "memory" are not allowed
ERROR:  multiple primary keys for table "migration_overrides" are not allowed
ERROR:  multiple primary keys for table "move_history" are not allowed
ERROR:  multiple primary keys for table "naturalearth_countries" are not allowed
ERROR:  multiple primary keys for table "notification" are not allowed
ERROR:  multiple primary keys for table "partner_audit" are not allowed
ERROR:  multiple primary keys for table "partner" are not allowed
ERROR:  multiple primary keys for table "person_audit" are not allowed
ERROR:  multiple primary keys for table "person" are not allowed
ERROR:  multiple primary keys for table "session" are not allowed
ERROR:  multiple primary keys for table "session_sync_checkpoint" are not allowed
ERROR:  multiple primary keys for table "shared_link_asset" are not allowed
ERROR:  relation "shared_link_key_uq" already exists
ERROR:  multiple primary keys for table "shared_link" are not allowed
ERROR:  relation "shared_link_slug_uq" already exists
ERROR:  multiple primary keys for table "smart_search" are not allowed
ERROR:  multiple primary keys for table "stack_audit" are not allowed
ERROR:  multiple primary keys for table "stack" are not allowed
ERROR:  relation "stack_primaryAssetId_uq" already exists
ERROR:  multiple primary keys for table "system_metadata" are not allowed
ERROR:  multiple primary keys for table "tag_asset" are not allowed
ERROR:  multiple primary keys for table "tag_closure" are not allowed
ERROR:  multiple primary keys for table "tag" are not allowed
ERROR:  relation "tag_userId_value_uq" already exists
ERROR:  multiple primary keys for table "user_audit" are not allowed
ERROR:  relation "user_email_uq" already exists
ERROR:  multiple primary keys for table "user_metadata_audit" are not allowed
ERROR:  multiple primary keys for table "user_metadata" are not allowed
ERROR:  multiple primary keys for table "user" are not allowed
ERROR:  relation "user_storageLabel_uq" already exists
ERROR:  multiple primary keys for table "version_history" are not allowed
ERROR:  relation "IDX_geodata_gist_earthcoord" already exists
ERROR:  relation "IDX_user_metadata_audit_deleted_at" already exists
ERROR:  relation "IDX_user_metadata_audit_key" already exists
ERROR:  relation "IDX_user_metadata_audit_user_id" already exists
ERROR:  relation "IDX_user_metadata_update_id" already exists
ERROR:  relation "IDX_user_metadata_updated_at" already exists
ERROR:  relation "UQ_assets_owner_checksum" already exists
ERROR:  relation "activity_albumId_assetId_idx" already exists
ERROR:  relation "activity_albumId_idx" already exists
ERROR:  relation "activity_assetId_idx" already exists
ERROR:  relation "activity_like_idx" already exists
ERROR:  relation "activity_updateId_idx" already exists
ERROR:  relation "activity_userId_idx" already exists
ERROR:  relation "album_albumThumbnailAssetId_idx" already exists
ERROR:  relation "album_asset_albumsId_idx" already exists
ERROR:  relation "album_asset_assetsId_idx" already exists
ERROR:  relation "album_asset_audit_albumId_idx" already exists
ERROR:  relation "album_asset_audit_assetId_idx" already exists
ERROR:  relation "album_asset_audit_deletedAt_idx" already exists
ERROR:  relation "album_asset_updateId_idx" already exists
ERROR:  relation "album_audit_albumId_idx" already exists
ERROR:  relation "album_audit_deletedAt_idx" already exists
ERROR:  relation "album_audit_userId_idx" already exists
ERROR:  relation "album_ownerId_idx" already exists
ERROR:  relation "album_updateId_idx" already exists
ERROR:  relation "album_user_albumsId_idx" already exists
ERROR:  relation "album_user_audit_albumId_idx" already exists
ERROR:  relation "album_user_audit_deletedAt_idx" already exists
ERROR:  relation "album_user_audit_userId_idx" already exists
ERROR:  relation "album_user_createId_idx" already exists
ERROR:  relation "album_user_updateId_idx" already exists
ERROR:  relation "album_user_usersId_idx" already exists
ERROR:  relation "api_key_updateId_idx" already exists
ERROR:  relation "api_key_userId_idx" already exists
ERROR:  relation "asset_audit_assetId_idx" already exists
ERROR:  relation "asset_audit_deletedAt_idx" already exists
ERROR:  relation "asset_audit_ownerId_idx" already exists
ERROR:  relation "asset_checksum_idx" already exists
ERROR:  relation "asset_duplicateId_idx" already exists
ERROR:  relation "asset_exif_autoStackId_idx" already exists
ERROR:  relation "asset_exif_city_idx" already exists
ERROR:  relation "asset_exif_livePhotoCID_idx" already exists
ERROR:  relation "asset_exif_updateId_idx" already exists
ERROR:  relation "asset_face_assetId_personId_idx" already exists
ERROR:  relation "asset_face_audit_assetFaceId_idx" already exists
ERROR:  relation "asset_face_audit_assetId_idx" already exists
ERROR:  relation "asset_face_audit_deletedAt_idx" already exists
ERROR:  relation "asset_face_personId_assetId_idx" already exists
ERROR:  relation "asset_fileCreatedAt_idx" already exists
ERROR:  relation "asset_file_assetId_idx" already exists
ERROR:  relation "asset_file_updateId_idx" already exists
ERROR:  relation "asset_id_stackId_idx" already exists
ERROR:  relation "asset_libraryId_idx" already exists
ERROR:  relation "asset_livePhotoVideoId_idx" already exists
ERROR:  relation "asset_localDateTime_idx" already exists
ERROR:  relation "asset_localDateTime_month_idx" already exists
ERROR:  relation "asset_metadata_audit_assetId_idx" already exists
ERROR:  relation "asset_metadata_audit_deletedAt_idx" already exists
ERROR:  relation "asset_metadata_audit_key_idx" already exists
ERROR:  relation "asset_metadata_updateId_idx" already exists
ERROR:  relation "asset_metadata_updatedAt_idx" already exists
ERROR:  relation "asset_originalFileName_idx" already exists
ERROR:  relation "asset_originalFilename_trigram_idx" already exists
ERROR:  relation "asset_originalPath_libraryId_idx" already exists
ERROR:  relation "asset_ownerId_idx" already exists
ERROR:  relation "asset_ownerId_libraryId_checksum_idx" already exists
ERROR:  relation "asset_stackId_idx" already exists
ERROR:  relation "asset_updateId_idx" already exists
ERROR:  relation "audit_ownerId_createdAt_idx" already exists
ERROR:  relation "clip_index" already exists
ERROR:  relation "face_index" already exists
ERROR:  relation "idx_geodata_places_admin1_name" already exists
ERROR:  relation "idx_geodata_places_admin2_name" already exists
ERROR:  relation "idx_geodata_places_alternate_names" already exists
ERROR:  relation "idx_geodata_places_name" already exists
ERROR:  relation "library_ownerId_idx" already exists
ERROR:  relation "library_updateId_idx" already exists
ERROR:  relation "memory_asset_assetsId_idx" already exists
ERROR:  relation "memory_asset_audit_assetId_idx" already exists
ERROR:  relation "memory_asset_audit_deletedAt_idx" already exists
ERROR:  relation "memory_asset_audit_memoryId_idx" already exists
ERROR:  relation "memory_asset_memoriesId_idx" already exists
ERROR:  relation "memory_asset_updateId_idx" already exists
ERROR:  relation "memory_audit_deletedAt_idx" already exists
ERROR:  relation "memory_audit_memoryId_idx" already exists
ERROR:  relation "memory_audit_userId_idx" already exists
ERROR:  relation "memory_ownerId_idx" already exists
ERROR:  relation "memory_updateId_idx" already exists
ERROR:  relation "notification_updateId_idx" already exists
ERROR:  relation "notification_userId_idx" already exists
ERROR:  relation "partner_audit_deletedAt_idx" already exists
ERROR:  relation "partner_audit_sharedById_idx" already exists
ERROR:  relation "partner_audit_sharedWithId_idx" already exists
ERROR:  relation "partner_createId_idx" already exists
ERROR:  relation "partner_sharedWithId_idx" already exists
ERROR:  relation "partner_updateId_idx" already exists
ERROR:  relation "person_audit_deletedAt_idx" already exists
ERROR:  relation "person_audit_ownerId_idx" already exists
ERROR:  relation "person_audit_personId_idx" already exists
ERROR:  relation "person_faceAssetId_idx" already exists
ERROR:  relation "person_ownerId_idx" already exists
ERROR:  relation "person_updateId_idx" already exists
ERROR:  relation "session_parentId_idx" already exists
ERROR:  relation "session_sync_checkpoint_sessionId_idx" already exists
ERROR:  relation "session_sync_checkpoint_updateId_idx" already exists
ERROR:  relation "session_updateId_idx" already exists
ERROR:  relation "session_userId_idx" already exists
ERROR:  relation "shared_link_albumId_idx" already exists
ERROR:  relation "shared_link_asset_assetsId_idx" already exists
ERROR:  relation "shared_link_asset_sharedLinksId_idx" already exists
ERROR:  relation "shared_link_key_idx" already exists
ERROR:  relation "shared_link_userId_idx" already exists
ERROR:  relation "stack_audit_deletedAt_idx" already exists
ERROR:  relation "stack_ownerId_idx" already exists
ERROR:  relation "stack_primaryAssetId_idx" already exists
ERROR:  relation "tag_asset_assetsId_idx" already exists
ERROR:  relation "tag_asset_assetsId_tagsId_idx" already exists
ERROR:  relation "tag_asset_tagsId_idx" already exists
ERROR:  relation "tag_closure_id_ancestor_idx" already exists
ERROR:  relation "tag_closure_id_descendant_idx" already exists
ERROR:  relation "tag_parentId_idx" already exists
ERROR:  relation "tag_updateId_idx" already exists
ERROR:  relation "user_audit_deletedAt_idx" already exists
ERROR:  relation "user_updateId_idx" already exists
ERROR:  relation "user_updatedAt_id_idx" already exists
ERROR:  trigger "activity_updatedAt" for relation "activity" already exists
ERROR:  trigger "album_asset_delete_audit" for relation "album_asset" already exists
ERROR:  trigger "album_asset_updatedAt" for relation "album_asset" already exists
ERROR:  trigger "album_delete_audit" for relation "album" already exists
ERROR:  trigger "album_updatedAt" for relation "album" already exists
ERROR:  trigger "album_user_after_insert" for relation "album_user" already exists
ERROR:  trigger "album_user_delete_audit" for relation "album_user" already exists
ERROR:  trigger "album_user_updatedAt" for relation "album_user" already exists
ERROR:  trigger "api_key_updatedAt" for relation "api_key" already exists
ERROR:  trigger "asset_delete_audit" for relation "asset" already exists
ERROR:  trigger "asset_exif_updatedAt" for relation "asset_exif" already exists
ERROR:  trigger "asset_face_audit" for relation "asset_face" already exists
ERROR:  trigger "asset_face_updatedAt" for relation "asset_face" already exists
ERROR:  trigger "asset_file_updatedAt" for relation "asset_file" already exists
ERROR:  trigger "asset_metadata_audit" for relation "asset_metadata" already exists
ERROR:  trigger "asset_metadata_updated_at" for relation "asset_metadata" already exists
ERROR:  trigger "asset_updatedAt" for relation "asset" already exists
ERROR:  trigger "library_updatedAt" for relation "library" already exists
ERROR:  trigger "memory_asset_delete_audit" for relation "memory_asset" already exists
ERROR:  trigger "memory_asset_updatedAt" for relation "memory_asset" already exists
ERROR:  trigger "memory_delete_audit" for relation "memory" already exists
ERROR:  trigger "memory_updatedAt" for relation "memory" already exists
ERROR:  trigger "notification_updatedAt" for relation "notification" already exists
ERROR:  trigger "partner_delete_audit" for relation "partner" already exists
ERROR:  trigger "partner_updatedAt" for relation "partner" already exists
ERROR:  trigger "person_delete_audit" for relation "person" already exists
ERROR:  trigger "person_updatedAt" for relation "person" already exists
ERROR:  trigger "session_sync_checkpoint_updatedAt" for relation "session_sync_checkpoint" already exists
ERROR:  trigger "session_updatedAt" for relation "session" already exists
ERROR:  trigger "stack_delete_audit" for relation "stack" already exists
ERROR:  trigger "stack_updatedAt" for relation "stack" already exists
ERROR:  trigger "tag_updatedAt" for relation "tag" already exists
ERROR:  trigger "user_delete_audit" for relation "user" already exists
ERROR:  trigger "user_metadata_audit" for relation "user_metadata" already exists
ERROR:  trigger "user_metadata_updated_at" for relation "user_metadata" already exists
ERROR:  trigger "user_updatedAt" for relation "user" already exists
ERROR:  constraint "activity_albumId_assetId_fkey" for relation "activity" already exists
ERROR:  constraint "activity_albumId_fkey" for relation "activity" already exists
ERROR:  constraint "activity_assetId_fkey" for relation "activity" already exists
ERROR:  constraint "activity_userId_fkey" for relation "activity" already exists
ERROR:  constraint "album_albumThumbnailAssetId_fkey" for relation "album" already exists
ERROR:  constraint "album_asset_albumsId_fkey" for relation "album_asset" already exists
ERROR:  constraint "album_asset_assetsId_fkey" for relation "album_asset" already exists
ERROR:  constraint "album_asset_audit_albumId_fkey" for relation "album_asset_audit" already exists
ERROR:  constraint "album_ownerId_fkey" for relation "album" already exists
ERROR:  constraint "album_user_albumsId_fkey" for relation "album_user" already exists
ERROR:  constraint "album_user_usersId_fkey" for relation "album_user" already exists
ERROR:  constraint "api_key_userId_fkey" for relation "api_key" already exists
ERROR:  constraint "asset_exif_assetId_fkey" for relation "asset_exif" already exists
ERROR:  constraint "asset_face_assetId_fkey" for relation "asset_face" already exists
ERROR:  constraint "asset_face_personId_fkey" for relation "asset_face" already exists
ERROR:  constraint "asset_file_assetId_fkey" for relation "asset_file" already exists
ERROR:  constraint "asset_job_status_assetId_fkey" for relation "asset_job_status" already exists
ERROR:  constraint "asset_libraryId_fkey" for relation "asset" already exists
ERROR:  constraint "asset_livePhotoVideoId_fkey" for relation "asset" already exists
ERROR:  constraint "asset_metadata_assetId_fkey" for relation "asset_metadata" already exists
ERROR:  constraint "asset_ownerId_fkey" for relation "asset" already exists
ERROR:  constraint "asset_stackId_fkey" for relation "asset" already exists
ERROR:  constraint "face_search_faceId_fkey" for relation "face_search" already exists
ERROR:  constraint "library_ownerId_fkey" for relation "library" already exists
ERROR:  constraint "memory_asset_assetsId_fkey" for relation "memory_asset" already exists
ERROR:  constraint "memory_asset_audit_memoryId_fkey" for relation "memory_asset_audit" already exists
ERROR:  constraint "memory_asset_memoriesId_fkey" for relation "memory_asset" already exists
ERROR:  constraint "memory_ownerId_fkey" for relation "memory" already exists
ERROR:  constraint "notification_userId_fkey" for relation "notification" already exists
ERROR:  constraint "partner_sharedById_fkey" for relation "partner" already exists
ERROR:  constraint "partner_sharedWithId_fkey" for relation "partner" already exists
ERROR:  constraint "person_faceAssetId_fkey" for relation "person" already exists
ERROR:  constraint "person_ownerId_fkey" for relation "person" already exists
ERROR:  constraint "session_parentId_fkey" for relation "session" already exists
ERROR:  constraint "session_sync_checkpoint_sessionId_fkey" for relation "session_sync_checkpoint" already exists
ERROR:  constraint "session_userId_fkey" for relation "session" already exists
ERROR:  constraint "shared_link_albumId_fkey" for relation "shared_link" already exists
ERROR:  constraint "shared_link_asset_assetsId_fkey" for relation "shared_link_asset" already exists
ERROR:  constraint "shared_link_asset_sharedLinksId_fkey" for relation "shared_link_asset" already exists
ERROR:  constraint "shared_link_userId_fkey" for relation "shared_link" already exists
ERROR:  constraint "smart_search_assetId_fkey" for relation "smart_search" already exists
ERROR:  constraint "stack_ownerId_fkey" for relation "stack" already exists
ERROR:  constraint "stack_primaryAssetId_fkey" for relation "stack" already exists
ERROR:  constraint "tag_asset_assetsId_fkey" for relation "tag_asset" already exists
ERROR:  constraint "tag_asset_tagsId_fkey" for relation "tag_asset" already exists
ERROR:  constraint "tag_closure_id_ancestor_fkey" for relation "tag_closure" already exists
ERROR:  constraint "tag_closure_id_descendant_fkey" for relation "tag_closure" already exists
ERROR:  constraint "tag_parentId_fkey" for relation "tag" already exists
ERROR:  constraint "tag_userId_fkey" for relation "tag" already exists
ERROR:  constraint "user_metadata_userId_fkey" for relation "user_metadata" already exists
GRANT
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
DROP DATABASE
CREATE DATABASE
ALTER DATABASE
You are now connected to database "postgres" as user "postgres".
SET
SET
SET
SET
SET
     set_config     
--------------------
 public, pg_catalog
(1 row)

SET
SET
SET
SET
COMMENT

Yes those error are quite normal as you already have an existing immich db even empty. Let me some time to write an test a script for all the operations.
See [FEATURE] Provide a bash script to easily restore an immich db backup · Issue #279 · YunoHost-Apps/immich_ynh · GitHub

Returning to my original post, I tried to update to the new version and the problem persist
Log: https://paste.yunohost.org/raw/acibuwugel

I haven’t tried anything yet

sudo rm -f /swap_immich

I did that, and still no luck

Log: https://paste.yunohost.org/raw/itorenemab

I was reading it a bit, and it’s worth mentioning that I’ve Yunohost installed on an SD card, but everything else is on an sdd

That the point !
PS : using an sdcard as the main device is really not recommended…

I just have ynh boot installed on the SD, it’s not the main device, the idea behind that is to be able to backup the SD separately without touching the root “partition”. If I’m not mistaken I did something similar to this: Is it possible to install applications on a external USB hard disk? - #5 by Dams

And I have had the same configuration in the previous updates, even the last one v1.141.1~ynh1.

If I enlarge my current swap-file (at least temporarily) should that be enough?

Also, in the SD card as it just have the root partition, I’ve like 55gb available.

Not sure to understand your config without knowing the content of /et/fstab, but a swap of 4GB on the SSD should be enough.

1 Like