docker-library / postgres

Docker Official Image packaging for Postgres

Home Page:http://www.postgresql.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when restoring a backup from one Docker container to another using pg_dump client

igallart opened this issue · comments

SO: Ubuntu 22.04 (32 GB RAM)

Install last client:
https://www.postgresql.org/download/linux/ubuntu/

Run a docker postgres:16

Backup from docker:
docker exec -t postgres pg_dump -U usr -Fc -Z4 -Od DATABASE > DATABASE.dump

Restore into docker with client:
pg_restore -vvv -U usr -h 127.0.0.1 -j 4 -Od TEST DATABASE.dump

Show errors and fail:
pg_restore: allocating AH for TEST.dump, format 0
pg_restore: attempting to ascertain archive format
pg_restore: conectando a la base de datos para reestablecimiento
pg_restore: asumiendo reestablecimiento de sólo datos
pg_restore: entering restore_toc_entries_prefork
pg_restore: entering restore_toc_entries_parallel
memoria agotada

But the backup is done with pg_dump from client it works (pg_dump from localhost, not docker):
pg_dump -U usr -h 127.0.0.1 -Fc -Z4 -Od DATABASE > DATABASE.dump