X-Git-Url: http://git.hcoop.net/clinton/scripts.git/blobdiff_plain/0031afdd1cb29e44a5b596be266c2eff527501ba..40c0d8c4498b0d716f91211b1f5e97003c19e5e3:/hcoop-backup diff --git a/hcoop-backup b/hcoop-backup index 51d4a79..2bf50f9 100755 --- a/hcoop-backup +++ b/hcoop-backup @@ -25,6 +25,7 @@ IFS=$'\n' RSYNCDIR=/vicepa/hcoop-backups/files rm -fr $RSYNCDIR mkdir -p $RSYNCDIR/$CURDATE +chmod -R og= $RSYNCDIR # Initialize backup staging area mkdir -p $BACKUPTMP @@ -160,6 +161,12 @@ tar -C /var/backups/databases/ -cf - . | \ ccrypt -k $KEYFILE -e | \ $MOVE_OVER $CURDATE $F +# Update file permissions so that rsync.net can access the backups +chmod -R go=,u-w $RSYNCDIR +chmod u+w $RSYNCDIR +chown -R rsync $RSYNCDIR/$CURDATE + +# Complain to admins if there are unknown files grep '[a-z/]' complain && \ mail -a 'From: The Backup Program ' \ -s "automated message: annoying files found on deleuze (please do something about them)" admins@hcoop.net \