Mercurial > public > ssdt-docker
annotate scripts/restore-usps.sh @ 220:a37d6ff039d6 release/v1.6.0
remove obsolete training script
author | smith@nwoca.org |
---|---|
date | Mon, 09 Oct 2017 17:22:03 +0100 |
parents | fea886ba7279 |
children |
rev | line source |
---|---|
54 | 1 #!/bin/bash |
35 | 2 if [ -z "$1" ] |
3 then | |
4 echo "Usage: `basename $0` {backup file to restore}" | |
5 echo " filename must relative to the container's file system. (e.g. /backup/filename)" | |
6 exit $E_NOARGS | |
7 fi | |
191
fea886ba7279
DEP-12: add source for .functions.sh to all scripts using compose
smith@nwoca.org
parents:
54
diff
changeset
|
8 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" |
35 | 9 |
10 docker-compose stop uspsapp | |
11 docker-compose restart uspsdb | |
12 docker-compose run --rm uspsdb sh -c \ | |
13 "gunzip -f $1 -c | psql --host=uspsdb --username=postgres" | |
14 docker-compose start uspsapp | |
15 |