exec -it postgres pg_dump -h localhost -p 5432 -U postgres -d postgres > backup.sql im able to take a backup of that database and store it directly on my pc
but when trying to restore it with pg_restore, then it looks for that sql file inside the docker container rather than on my pc. how could i restore it from my pc directly?
Like this https://stackoverflow.com/a/29913462
thank you so much im on windows not on linux and type backup.sql | docker exec -i postgres psql -U postgres worked
Обсуждают сегодня