changeset 26:93f2976a6c2f

add usas backup script
author Dave smith <smith@nwoca.org>
date Sun, 17 Jan 2016 19:53:40 -0500
parents 727f4cbded5e
children d8c2d819e814
files scripts/backup-usas.sh
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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"