Mercurial > hg > soundsoftware-site
diff deploy/config/cron.monthly/00-backup-files @ 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.monthly/00-backup-files@d0d59d12db94 |
children | 45b0571b684d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/config/cron.monthly/00-backup-files Thu Aug 17 11:55:29 2017 +0100 @@ -0,0 +1,10 @@ +#!/bin/sh +for location in var/www etc/apache2 etc/cron.*; do + target="/var/files/backups/`echo $location | sed 's,/,_,g'`-`date +%Y%m%d%H%M`" + oldmask=`umask` + umask 0277 + cd / + tar cjf "$target".tar.bz2 "$location" + umask "$oldmask" +done +