Mercurial > hg > soundsoftware-site
annotate extra/soundsoftware/scripted-deploy/config/cron.daily/00-backup-db @ 1586:d0d59d12db94 dockerise
Add some cron scripts, update
author | Chris Cannam |
---|---|
date | Wed, 16 Aug 2017 16:58:22 +0100 |
parents | |
children |
rev | line source |
---|---|
Chris@1586 | 1 #!/bin/sh |
Chris@1586 | 2 outfile="/var/files/backups/postgres-dumpall-`date +%Y%m%d%H%M`" |
Chris@1586 | 3 oldmask=`umask` |
Chris@1586 | 4 umask 0277 |
Chris@1586 | 5 su postgres -c /usr/bin/pg_dumpall > "$outfile" && bzip2 "$outfile" |
Chris@1586 | 6 umask "$oldmask" |