diff --git a/dbbackup-cron b/dbbackup-cron index f8dae27..ef9d0c7 100644 --- a/dbbackup-cron +++ b/dbbackup-cron @@ -1,3 +1,5 @@ +SHELL=/bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # run system backups # diff --git a/dbbackup-docker-compose b/dbbackup-docker-compose index 3f300a0..1d5cc13 100755 --- a/dbbackup-docker-compose +++ b/dbbackup-docker-compose @@ -136,13 +136,13 @@ delete_old() { do_backup() { FILE=$1 CONTAINER=$2 - VER=`$DC exec $CONTAINER pg_config --version` + VER=`$DC exec -T $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 $CONTAINER $DUMP_CMD" + CMD="$DC exec -T $CONTAINER $DUMP_CMD" verbose "doing database dump: $CMD" $CMD >> $FILE }