view deploy/config/cron.monthly/00-backup-files @ 1593:83412a0a2389 dockerise

Handle API keys etc, + tidying handling of generated files
author Chris Cannam
date Fri, 18 Aug 2017 15:02:20 +0100
parents d8949733849d
children 45b0571b684d
line wrap: on
line source
#!/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