ImmichI
Immich8mo ago
Vat.Kris

Error in backup from sql dump

Hey team, I'm getting an error when trying to backup - can you please help figure it out?

I followed the instructions from the backup / restore page on the docs. I didn't have a manual backup dump, but I used the latest dump from about 5 days back (container has been down since then).

Things to know / key differences:
  1. I'm migrating from my NAS to a Ubuntu server on a N150 minipc
  2. The version on my NAS was not the latest, I believe I had v1.131.3 running on the server
  3. I downloaded the latest images and yaml files on to the Ubuntu server
  4. The db backups, thumbs, profile and encoded videos are local and mounted according to instructions in the docs (https://immich.app/docs/guides/custom-locations/)
  5. The yaml has hardware accel enabled (just as in my old setup).
  6. The latest yaml has valkey image but my older install did not
But it never got to the stage where most of the above would have mattered, because when I docker create the containers, it's all successful. docker start immich_postgres is also successful. But when I run the below command is when it fails:

gunzip --stdout "/immich/upload/backups/immich-db-backup-1746856800009.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=postgres --username=postgres

It was a fresh clean install, and the containers had never been run before.
Was this page helpful?