X-Git-Url: http://git.hcoop.net/clinton/scripts.git/blobdiff_plain/74bfc8b7d79cbf6025e8389d00a3f96d0d33c454..5ab432e8d4fa42dc8cdcf4127fca412afcbe546f:/hcoop-backup diff --git a/hcoop-backup b/hcoop-backup index d771434..51da992 100755 --- a/hcoop-backup +++ b/hcoop-backup @@ -25,6 +25,8 @@ IFS=$'\n' RSYNCDIR=/vicepa/hcoop-backups/files rm -fr $RSYNCDIR mkdir -p $RSYNCDIR/$CURDATE +chmod og=rx,u=rwx $RSYNCDIR +chmod og= $RSYNCDIR/$CURDATE # Initialize backup staging area mkdir -p $BACKUPTMP @@ -161,9 +163,9 @@ tar -C /var/backups/databases/ -cf - . | \ $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 +chmod -R go=,u-w $RSYNCDIR/$CURDATE +chmod u+w $RSYNCDIR/$CURDATE +chown -R rsync $RSYNCDIR/$CURDATE # Complain to admins if there are unknown files grep '[a-z/]' complain && \