Mercurial > hg > soundsoftware-site
annotate deploy/config/cron.monthly/00-backup-files @ 1626:44cbe9fa0b4e live
Merge
author | Chris Cannam |
---|---|
date | Thu, 07 Feb 2019 13:49:16 +0000 |
parents | 45b0571b684d |
children |
rev | line source |
---|---|
Chris@1586 | 1 #!/bin/sh |
Chris@1596 | 2 cd / |
Chris@1586 | 3 for location in var/www etc/apache2 etc/cron.*; do |
Chris@1586 | 4 target="/var/files/backups/`echo $location | sed 's,/,_,g'`-`date +%Y%m%d%H%M`" |
Chris@1586 | 5 oldmask=`umask` |
Chris@1586 | 6 umask 0277 |
Chris@1586 | 7 tar cjf "$target".tar.bz2 "$location" |
Chris@1586 | 8 umask "$oldmask" |
Chris@1586 | 9 done |
Chris@1586 | 10 |