Brocily
IImmich
•Created by Brocily on 5/21/2023 in #help-desk-support
Issue restoring a database backup
I recently move from Windows server to Debian 11. I took a backup following this documentation:
https://documentation.immich.app/docs/administration/backup-and-restore
I've setup Immich again using docker compose and now want to restore the database from my previous installation. However, I get the following error:
ERROR: cannot drop the currently open database
ERROR: current user cannot be dropped
ERROR: role "postgres" already exists
ERROR: relation "albums" already exists
ALTER TABLE
COMMENT
ERROR: relation "albums_assets_assets" already exists
ALTER TABLE
ERROR: relation "albums_shared_users_users" already exists
ALTER TABLE
ERROR: relation "api_keys" already exists
ALTER TABLE
ERROR: relation "assets" already exists
ALTER TABLE
ERROR: relation "exif" already exists
ALTER TABLE
ERROR: relation "migrations" already exists
ALTER TABLE
ERROR: relation "migrations_id_seq" already exists
ALTER TABLE
ALTER SEQUENCE
ERROR: relation "shared_link__asset" already exists
ALTER TABLE
ERROR: relation "shared_links" already exists
ALTER TABLE
ERROR: relation "smart_info" already exists
ALTER TABLE
ERROR: relation "system_config" already exists
ALTER TABLE
ERROR: relation "tag_asset" already exists
ALTER TABLE
ERROR: relation "tags" already exists
ALTER TABLE
COMMENT
ERROR: relation "typeorm_metadata" already exists
ALTER TABLE
ERROR: relation "user_token" already exists
ALTER TABLE
ERROR: relation "users" already exists
ALTER TABLE
ALTER TABLE
ERROR: insert or update on table "assets" violates foreign key constraint "FK_2c5ac0d6fb58b238fd2068de67d"
...
...
...
I'm relatively new to Linux so any help would be appreciated 🙂
18 replies