diff scripts/backup-usps.sh @ 163:daf91a3bbee5 production v1.2.0

flow: Merged <release> 'v1.2.0' to <master> ('production').
author smith@nwoca.org
date Tue, 15 Aug 2017 21:59:23 +0100
parents 303259c08b7d
children 620ea742f1df
line wrap: on
line diff
--- a/scripts/backup-usps.sh	Fri Jun 16 17:14:15 2017 +0100
+++ b/scripts/backup-usps.sh	Tue Aug 15 21:59:23 2017 +0100
@@ -1,6 +1,6 @@
 #!/bin/bash
- docker-compose run --rm uspsdb sh -c \
-   "pg_dump -Cc --if-exists --host=uspsdb \
-      --dbname=\$USPSDB_ENV_DB_NAME \
-	  --username=\$USPSDB_ENV_DB_USER | gzip \
-	  > /backup/\$USPSDB_ENV_DB_NAME.$(date +%Y-%m-%d-%H-%M-%S).backup.gz"
+
+source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
+
+${SSDT_SCRIPTS}/backup-container.sh uspsdb
+