diff scripts/backup-usas.sh @ 26:93f2976a6c2f

add usas backup script
author Dave smith <smith@nwoca.org>
date Sun, 17 Jan 2016 19:53:40 -0500
parents
children 443aa0be3f09
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/backup-usas.sh	Sun Jan 17 19:53:40 2016 -0500
@@ -0,0 +1,6 @@
+
+ docker-compose run --rm usasdb sh -c \
+   "pg_dump -Cc --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"