comparison scripts/backup-usps.sh @ 159:303259c08b7d

DEP-12: update backup scripts
author smith@nwoca.org
date Wed, 02 Aug 2017 21:44:52 +0100
parents 334d65dac778
children 620ea742f1df
comparison
equal deleted inserted replaced
158:4bc3485f8460 159:303259c08b7d
1 #!/bin/bash 1 #!/bin/bash
2 docker-compose run --rm uspsdb sh -c \ 2
3 "pg_dump -Cc --if-exists --host=uspsdb \ 3 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
4 --dbname=\$USPSDB_ENV_DB_NAME \ 4
5 --username=\$USPSDB_ENV_DB_USER | gzip \ 5 ${SSDT_SCRIPTS}/backup-container.sh uspsdb
6 > /backup/\$USPSDB_ENV_DB_NAME.$(date +%Y-%m-%d-%H-%M-%S).backup.gz" 6