annotate 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
rev   line source
26
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
1
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
2 docker-compose run --rm usasdb sh -c \
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
3 "pg_dump -Cc --host=usasdb \
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
4 --dbname=\$USASDB_ENV_DB_NAME \
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
5 --username=\$USASDB_ENV_DB_USER | gzip \
93f2976a6c2f add usas backup script
Dave smith <smith@nwoca.org>
parents:
diff changeset
6 > /backup/\$USASDB_ENV_DB_NAME.$(date +%Y-%m-%d-%H-%M-%S).backup.gz"