Skip to content

Instantly share code, notes, and snippets.

View nuware-abhishek's full-sized avatar

nuware-abhishek

View GitHub Profile
@nuware-abhishek
nuware-abhishek / restore
Created May 4, 2017 07:08 — forked from jgillman/restore.sh
pg_restore a local db dump into Docker
# 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"
docker-compose up -d db
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}"
docker-compose stop db
For pgAdmin 4 v1.4 on Ubuntu 16.04, according to the download page and desktop deployment:
Install dependencies, create a virtual environment, download, install & configure
sudo apt-get install virtualenv python-pip libpq-dev python-dev
cd
virtualenv pgadmin4
cd pgadmin4