Unable to restore server

For some reason, my Immich server won't restore from my db.gz backup, I was running on a different server but have moved my install to a new server.

The command I am using to restore the database is:

docker compose down -v
rm -rf /srv/dev-disk-by-uuid-a914a7e5-3822-4cdb-a5e8-e8c7e3d13883/Immich-docker/pgdata/
docker compose create
docker start immich_postgres
sleep 10
gunzip --stdout "/srv/dev-disk-by-uuid-a914a7e5-3822-4cdb-a5e8-e8c7e3d13883/Immich-docker/upload/backups/immich-db-backup-1742176800009.sql.gz"
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql –dbname=immich --username=postgres
docker compose up -d

--------------------------------------------

The command appears to work but when I visit my container at it's ip, it takes me to a landing page to create a new user. When I do so, it takes me to a new install with no assets or images. It does not seem to detect my files at all even though they are on the drive and mounted via my compose file at /srv/dev-disk-by-uuid-a914a7e5-3822-4cdb-a5e8-e8c7e3d13883/Immich-docker/upload

Here is a copy of my env, any help would be greatly appreciated.

-----------------------------------------------

The location where your uploaded files are stored

UPLOAD_LOCATION=/srv/dev-disk-by-uuid-a914a7e5-3822-4cdb-a5e8-e8c7e3d13883/Immich-docker/upload

The Immich version to use. You can pin this to a specific version like "v1.71.0"

IMMICH_VERSION=release

Connection secret for postgres. You should change it to a random password

DB_PASSWORD=redacted

The values below this line do not need to be changed

###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

-------------------------------------------
Was this page helpful?