From 4c9ca12a93a0139ad3d83308ecd79cfff975f5aa Mon Sep 17 00:00:00 2001 From: Dave lane Date: Fri, 9 Feb 2018 16:28:44 +1300 Subject: [PATCH] fixed path issue and docker-compose exec TTY problem --- dbbackup-cron | 2 ++ dbbackup-docker-compose | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 }