Restore base in container with Postgres

1

I am using a container with postgres on an EC2 server and I want to restore a base in this container via linux command. Any tips?

I was trying as follows:

sudo docker exec -t postgres_94 pg_restore -c -U postgres > minha_base.backup
    
asked by anonymous 27.10.2016 / 20:30

1 answer

1

I was able to resolve by executing command through docker-compose:

sudo docker exec -i app_postgres_94_1 pg_restore --host localhost --port 5432 --username "postgres" --dbname "database_name" --verbose < ~/minha_base.backup
    
27.10.2016 / 21:37