view deploy/config/cron.daily/00-backup-db @ 1590:c18460da6620 dockerise

Numerous deployment updates
author Chris Cannam
date Thu, 17 Aug 2017 16:04:36 +0100
parents d8949733849d
children
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"