diff scripts/backup-container.sh @ 186:620ea742f1df

DEP-12: add script to execute commands against multiple projects.
author smith@nwoca.org
date Wed, 20 Sep 2017 16:52:37 +0100
parents 303259c08b7d
children 2f5f41d237e7
line wrap: on
line diff
--- a/scripts/backup-container.sh	Wed Sep 20 16:19:19 2017 +0100
+++ b/scripts/backup-container.sh	Wed Sep 20 16:52:37 2017 +0100
@@ -23,7 +23,7 @@
 fi
 
 echo "starting backup of $container for $project"
-docker-compose exec $container sh -c "gosu postgres pg_dump -Cc --if-exists --dbname=$container ; (exit $?) " > ${backupFile}
+docker-compose exec -t $container sh -c "gosu postgres pg_dump -Cc --if-exists --dbname=$container ; (exit $?) " > ${backupFile}
 
 if [[ $( grep --count "CREATE TABLE" ${backupFile} ) -lt 200 || $( grep --count "PostgreSQL database dump complete" ${backupFile} ) -eq 0 ]]; then
    echo "ERROR: backup verification FAILED"