view 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
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