Created
September 17, 2018 00:03
-
-
Save duderamos/c352e61ebc605f7076b948e297fd789b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB_CONTAINER="$(docker-compose ps -q pgsql-10.4)" | |
DB_NAME=postgres | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="eeeff09c-9a4f-498a-8098-f38341fc984d.dump" | |
docker-compose up -d ${DB_CONTAINER} | |
docker exec -i "${DB_CONTAINER}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_NAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop ${DB_CONTAINER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment