view deploy/config/cron.daily/00-backup-db @ 1587:d8949733849d dockerise

Another rearrangement, to share provisioning scripts
author Chris Cannam
date Thu, 17 Aug 2017 11:55:29 +0100
parents extra/soundsoftware/scripted-deploy/config/cron.daily/00-backup-db@d0d59d12db94
children c18460da6620
line wrap: on
line source
#!/bin/sh
outfile="/var/files/backups/postgres-dumpall-`date +%Y%m%d%H%M`"
oldmask=`umask`
umask 0277
su postgres -c /usr/bin/pg_dumpall > "$outfile" && bzip2 "$outfile"
umask "$oldmask"