Revert "[IMP] Use 'docker exec' to backup database"

This reverts commit da74d4b4a6.
This commit is contained in:
Olivier DOSSMANN 2017-12-08 11:43:05 +01:00
parent da74d4b4a6
commit e92ea8488d

View File

@ -208,7 +208,7 @@ backup() {
test_create test_create
# Then check some specific things for dump method # Then check some specific things for dump method
test_backup test_backup
$docker_cmd exec -t ${POSTGRES_DOCKER_NAME} pg_dump -F c -U postgres > $PWD/gissmo-`date +"%Y.%m.%d.%H%M"`-${GISSMO_VERSION}.dump || error_and_quit "Failed to backup Gissmo database." $docker_cmd run -it --rm --volume $PWD/:/tmp/ --link ${POSTGRES_DOCKER_NAME}:db postgres:${POSTGRES_VERSION} bash -c 'exec pg_dump -F c -h "$DB_PORT_5432_TCP_ADDR" -p "$DB_PORT_5432_TCP_PORT" -U postgres postgres > /tmp/gissmo-`date +"%Y.%m.%d.%H%M"`-'${GISSMO_VERSION}'.dump' || error_and_quit "Failed to backup Gissmo database."
} }
init() { init() {