Mercurial > public > ssdt-docker
annotate scripts/restore-usps.sh @ 205:f24a5f2abcdf production
Added tag vv1.4.0 for changeset e05f5379eb0e
author | Christopher Springer <springer@nwoca.org> |
---|---|
date | Tue, 26 Sep 2017 15:34:00 +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 |