From da74d4b4a6fe45f7ec40b801baa285436cac7f22 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Wed, 22 Nov 2017 11:42:24 +0100 Subject: [PATCH] [IMP] Use 'docker exec' to backup database --- launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch.sh b/launch.sh index b3baaf2..dcfeb05 100755 --- a/launch.sh +++ b/launch.sh @@ -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() {