-
-
Save vietch2612/d019047e0529700ab790a0936c00dab9 to your computer and use it in GitHub Desktop.
Revisions
-
vietch2612 revised this gist
Jul 14, 2021 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,7 @@ 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 pg_restore --clean --no-owner -U vietcao -d sc-app-ror_development -1 /path/ -
jgillman renamed this gist
May 7, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jgillman revised this gist
May 7, 2016 . No changes.There are no files selected for viewing
-
jgillman created this gist
May 7, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # 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