how to restore Immich database backup on Umbrel 1.1?
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch.
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them.
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
gunzip < "/path/to/backup/dump.sql.gz" | docker exec -i immich_postgres psql --username=postgres # Restore Backup
docker compose up -d # Start remainder of Immich apps
I found here:
that docker and docker compose cannot be controlled directly, but how to execute above command with umbreld client? Is it even currently possible?
Now run these commands inside it: (basically using pgsql to delete the existing db)
3.1 psql -U immich postgres
you should see this:
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.
postgres=#
3.2 list existing db’s
\l
you should see immich listed. Now delete it
DROP DATABASE immich;
result: use \l and you should not see immich db anymore. if it still shows, you are wrong. try the db username as : postgres as in psql -U postgres postgres
now create a blank db:
create database immich;
3.4 exit pgsql using exit and then the docker again using exit
So, now you should be back at the umbrel server prompt. You can now run the db import / restore