Skip to content

Instantly share code, notes, and snippets.

@jackie-do
Last active November 14, 2017 11:14
Show Gist options
  • Save jackie-do/cd032be3547496ea931b1386a0562d99 to your computer and use it in GitHub Desktop.
Save jackie-do/cd032be3547496ea931b1386a0562d99 to your computer and use it in GitHub Desktop.
Restore a postgres database in a docker container
  1. Run the database container only. "docker container start [container name]"

  2. Connect pgAdmin to the docker container

  • Check port of the container, for example: "0.0.0.0:5432->5432/tcp"
  • Create a new connection on pgAdmn: "0.0.0.0:5432"
  1. Remove the old database

  2. Create a new database with a same name

  3. Right click on new datase and restore data by using a local dump file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment