view deploy/config/cron.monthly/00-backup-files @ 1621:3a510bf6a9bc

Merge from live branch
author Chris Cannam
date Fri, 13 Jul 2018 10:44:33 +0100
parents 45b0571b684d
children
line wrap: on
line source
#!/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
	tar cjf "$target".tar.bz2 "$location"
	umask "$oldmask"
done