Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

copy data from one postgres container to another

docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
cat your_dump.sql | docker exec -i your-db-container psql -U postgres
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #data #postgres #container
ADD COMMENT
Topic
Name
7+2 =