Skip to content

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

@igallart

Description

@igallart

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions