Hello,
I'm trying to migrate Immich to a new device. I've copied my immich folder (excluding the data folder as that's in a docker volume) and migrated the docker-compose and .env files. Then, I made the pg dump as specified in the docs. Now, I'm trying to restore from it and I keep on getting errors.
Here's my .env file:
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/toshi/immich-data
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v1.111.0
# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres
# The values below this line do not need to be changed
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres_immich
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis```
These are the commands in question I'm running:
gunzip < "dump.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 docker exec -e PGPASSWORD=postgres -i immich_postgres psql --username=postgres_immich --dbname=immich # Restore Backup
And this is the output:
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g"
| sudo docker exec -e PGPASSWORD=postgres -i immich_postgres psql --username=postgres_immich --dbname=immich # Restore Backup
ERROR: syntax error at or near "pg_dumpall"
LINE 1: pg_dumpall: error: connection to server on socket "/var/run/...
What am I doing wrong?
.