[IMP] Use 'docker exec' to backup database

master
Olivier DOSSMANN 2017-11-22 11:42:24 +01:00
parent 553174219c
commit da74d4b4a6
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ backup() {
test_create
# Then check some specific things for dump method
test_backup
$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."
$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."
}
init() {