diff --git a/dbbackup-docker-compose b/dbbackup-docker-compose index a44cc57..f0393a4 100755 --- a/dbbackup-docker-compose +++ b/dbbackup-docker-compose @@ -29,7 +29,7 @@ VERBOSE=0 # # Stuff that should be universal for this install... # where we can find this app... -#MAIN_DIR=`pwd` +MAIN_DIR=/home/data/scripts/pgdbbackup # determine today's date DATE=`date '+%Y-%m-%d-%a'` # determine today's date @@ -47,7 +47,7 @@ GREP=`which grep` # email program MAIL=`which mail` # database dump utility -DC=`which docker-compose` +DC=`which docker` #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 exec -T $CONTAINER pg_config --version` + VER=`$DC compose 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 exec -T $CONTAINER $DUMP_CMD" + CMD="$DC compose exec $CONTAINER $DUMP_CMD" verbose "doing database dump: $CMD" $CMD >> $FILE }