annotate extra/soundsoftware/scripted-deploy/config/cron.monthly/00-backup-files @ 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 for location in var/www etc/apache2 etc/cron.*; do
Chris@1586 3 target="/var/files/backups/`echo $location | sed 's,/,_,g'`-`date +%Y%m%d%H%M`"
Chris@1586 4 oldmask=`umask`
Chris@1586 5 umask 0277
Chris@1586 6 cd /
Chris@1586 7 tar cjf "$target".tar.bz2 "$location"
Chris@1586 8 umask "$oldmask"
Chris@1586 9 done
Chris@1586 10