diff --git a/dbbackup-docker-compose b/dbbackup-docker-compose index afef4a4..7dcf62a 100755 --- a/dbbackup-docker-compose +++ b/dbbackup-docker-compose @@ -47,7 +47,7 @@ GREP=`which grep` # email program MAIL=`which mail` # database dump utility -DC=`which docker` +DC=`which docker-compose` #DEF_ARGS="-C -d -O -x" # # pattern for "ls" command to build list of @@ -136,13 +136,13 @@ delete_old() { do_backup() { FILE=$1 CONTAINER=$2 - VER=`$DC compose exec $CONTAINER pg_config --version` + VER=`$DC exec $CONTAINER pg_config --version` verbose "Postgres version $VER - echoing to backup: $FILE" echo "--" > $FILE echo "-- PostgreSQL Version: $VER" >> $FILE echo "--" >> $FILE echo "" >> $FILE - CMD="$DC compose exec $CONTAINER $DUMP_CMD" + CMD="$DC exec $CONTAINER $DUMP_CMD" verbose "doing database dump: $CMD" $CMD >> $FILE }