Skip to content

Instantly share code, notes, and snippets.

@nmenag
Last active January 31, 2020 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmenag/09c3c60162ecf9fa0b12b762204da0df to your computer and use it in GitHub Desktop.
Save nmenag/09c3c60162ecf9fa0b12b762204da0df to your computer and use it in GitHub Desktop.
restore a postgres backup for a Docker app
# pass the backup to container
docker cp latest.dump quincename_db_1:/var/lib/postgresql/data
# exec backup
docker exec quincename_db_1 pg_restore --no-owner --verbose --clean --no-acl -U postgres -d quincename_development /var/lib/postgresql/data/latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment