© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•3y ago•
17 replies
Brocily

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 🙂
Backup and Restore | Immich
Database
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Restoring Backup
ImmichIImmich / help-desk-support
6mo ago
Restoring from backup
ImmichIImmich / help-desk-support
8mo ago
Error while restoring a backup
ImmichIImmich / help-desk-support
3mo ago
Restoring from backup error
ImmichIImmich / help-desk-support
9mo ago