comparison scripts/restore-usps.sh @ 191:fea886ba7279

DEP-12: add source for .functions.sh to all scripts using compose
author smith@nwoca.org
date Wed, 20 Sep 2017 17:56:23 +0100
parents 334d65dac778
children
comparison
equal deleted inserted replaced
190:c3587159637f 191:fea886ba7279
3 then 3 then
4 echo "Usage: `basename $0` {backup file to restore}" 4 echo "Usage: `basename $0` {backup file to restore}"
5 echo " filename must relative to the container's file system. (e.g. /backup/filename)" 5 echo " filename must relative to the container's file system. (e.g. /backup/filename)"
6 exit $E_NOARGS 6 exit $E_NOARGS
7 fi 7 fi
8 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
8 9
9 docker-compose stop uspsapp 10 docker-compose stop uspsapp
10 docker-compose restart uspsdb 11 docker-compose restart uspsdb
11 docker-compose run --rm uspsdb sh -c \ 12 docker-compose run --rm uspsdb sh -c \
12 "gunzip -f $1 -c | psql --host=uspsdb --username=postgres" 13 "gunzip -f $1 -c | psql --host=uspsdb --username=postgres"