diff deploy/config/cron.monthly/00-backup-files @ 1596:45b0571b684d dockerise

Minor docs, fixes, test
author Chris Cannam
date Fri, 18 Aug 2017 20:27:40 +0100
parents d8949733849d
children
line wrap: on
line diff
--- a/deploy/config/cron.monthly/00-backup-files	Fri Aug 18 16:25:04 2017 +0100
+++ b/deploy/config/cron.monthly/00-backup-files	Fri Aug 18 20:27:40 2017 +0100
@@ -1,9 +1,9 @@
 #!/bin/sh
+cd /
 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