Skip to content

Instantly share code, notes, and snippets.

@jmelchio
Last active March 30, 2019 18:35
Show Gist options
  • Save jmelchio/17ea330096163bfb5a7b2fd200b888c5 to your computer and use it in GitHub Desktop.
Save jmelchio/17ea330096163bfb5a7b2fd200b888c5 to your computer and use it in GitHub Desktop.
Sample of the creation of a postgres dumpfile using a docker container for running docker and running pg_dump
#!/usr/bin/env bash
docker run -it --rm --link docker-postgres:postgres \
-v"/home/joris/devel/go/src/github.com/jmelchio/vetlab/repository/ddl":"/tmp/dump" \
postgres pg_dump -h postgres -U postgres --schema-only --dbname=vetlab -f /tmp/dump/vetlab_dump.sql
# That's All Folks !!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment