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
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
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