diff scripts/backup-usas.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
line wrap: on
line diff
--- a/scripts/backup-usas.sh	Fri Jun 16 17:14:15 2017 +0100
+++ b/scripts/backup-usas.sh	Tue Aug 15 21:59:23 2017 +0100
@@ -1,6 +1,5 @@
 #!/bin/bash
- docker-compose run --rm usasdb sh -c \
-   "pg_dump -Cc --if-exists --host=usasdb \
-      --dbname=\$USASDB_ENV_DB_NAME \
-	  --username=\$USASDB_ENV_DB_USER | gzip \
-	  > /backup/\$USASDB_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 usasdb
+