view deploy/config/cron.monthly/00-backup-files @ 1622:f3144e23ca1d live

Don't try to use cgitb, it just causes problems with Apache CGI interface
author Chris Cannam
date Fri, 10 Aug 2018 11:22:30 +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