Created
September 30, 2019 07:40
-
-
Save ripper2hl/926489df2d13995abc3d57258e687514 to your computer and use it in GitHub Desktop.
Backup PostgreSQL database from a running Docker PostgreSQL container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec container /usr/bin/pg_dump -U user --format=plain --no-owner --no-acl sepomex | sed -E 's/(DROP|CREATE|COMMENT ON) EXTENSION/-- \1 EXTENSION/g' > prod.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment