Mercurial > public > ssdt-docker
comparison scripts/restore-usps.sh @ 27:d8c2d819e814
add usps restore script
author | Dave smith <smith@nwoca.org> |
---|---|
date | Mon, 18 Jan 2016 15:21:45 -0500 |
parents | |
children | 443aa0be3f09 |
comparison
equal
deleted
inserted
replaced
26:93f2976a6c2f | 27:d8c2d819e814 |
---|---|
1 | |
2 f [ -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 | |
8 | |
9 docker-compose stop uspsapp | |
10 docker-compose run --rm uspsdb sh -c \ | |
11 "gunzip -f $1 -c | psql --host=uspsdb \ | |
12 --dbname=\$USPSDB_ENV_DB_NAME \ | |
13 --username=\$USPSDB_ENV_DB_USER" | |
14 docker-compose stop uspsapp |