Skip to content

Instantly share code, notes, and snippets.

View mru2's full-sized avatar

David Ruyer mru2

View GitHub Profile
@mru2
mru2 / restore
Last active May 13, 2019 00:12 — forked from jgillman/restore.sh
pg_restore a local db dump into Docker
# Create and download backup
heroku pg:backups:capture
heroku pg:backups:download
# Assumes the database container is named 'db'
DOCKER_DB_NAME="$(docker-compose ps -q db)"
DB_HOSTNAME=db
DB_USER=postgres
LOCAL_DUMP_PATH="path/to/local.dump"