I ran the following commands to create the dump file
sudo docker-compose up -d db
sudo docker exec –i container_name pg_dump –username username database_name > desired_path/dump.sql
And then I added the file to an existing volume in the docker-compose.override.yml file
version: '3.7'
services:
db:
container_name: seqdb-db-container
volumes:
- ./dump.sql:path_to_volume_used_by_container
ports:
- 5432:5432
Finally I run
sudo docker exec –i container_name psql –username username database_name < path_to_dump_file
and I get the following error:
pg_restore: [archiver] input file appears to be a text format dump. Please use psql.
I want to use docker exec pg_restore without installing psql. Is there a solution to this or did I mount my volume incorrectly?