Postgres errors when restoring

I am testing my backups and am seeing a new error. The restore itself seems to be working, but I'm unsure what is leading to this error.

Error message (appears twice as postgres is being restored):
ERROR:  called `Result::unwrap()` on an `Err` value: Error { inner: Error { inner: TomlError { message: "invalid table header\nexpected newline, `#`", original: Some("[indexing.hnsw]\r\r\nm = 16\r\r\nef_construction = 300"), keys: [], span: Some(15..16) } } }


Command used to backup:
docker exec -t immich_postgres pg_dumpall -c -U postgres > /path/to/database-backup/immich-database.sql

Command used to restore:
cat /path/to/database-backup/immich-database.sql | 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

Relevant history:
  • This installation has been up for a very long time - about two years.
  • It went through the pgvector to pgvecto.rs breaking change, etc.
  • I restored from a backup a few months back and re-initialized the db to use data checksums. There were no errors at the time. No changes have been made to the compose file since.
Was this page helpful?