ImmichI
Immich12mo ago
Bubba

[SOLVED] pg_restore immich backup into new CNPG instance

  1. gunzip immich-db-backup-1735542000019.sql.gz
  2. sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" immich-db-backup-1735542000019.sql > immich-db-backup.sql
  3. kubectl -n databases cp ./immich-db-backup.sql postgres-16-1:/var/lib/postgresql/data/
  4. kubectl -n databases exec -it postgres-16-1 -- bash
  5. pg_restore -S postgres -U immich -Cev -f /var/lib/postgresql/data/immich-db-backup.sql
The last command just hangs with no output. I've tried with a variety of pg_restore options. Any suggestions?
Was this page helpful?