comparison scripts/restore-usps.sh @ 195:26bb64873bbe production v1.3.0

flow: Merged <release> 'v1.3.0' to <master> ('production').
author smith@nwoca.org
date Thu, 21 Sep 2017 17:14:46 +0100
parents fea886ba7279
children
comparison
equal deleted inserted replaced
184:26892906f365 195:26bb64873bbe
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"