backup-manager: Add help command.
[clinton/scripts.git] / hcoop-backup
index 2bf50f9..51da992 100755 (executable)
@@ -25,7 +25,8 @@ IFS=$'\n'
 RSYNCDIR=/vicepa/hcoop-backups/files
 rm -fr $RSYNCDIR
 mkdir -p $RSYNCDIR/$CURDATE
-chmod -R og= $RSYNCDIR
+chmod og=rx,u=rwx $RSYNCDIR
+chmod og= $RSYNCDIR/$CURDATE
 
 # Initialize backup staging area
 mkdir -p $BACKUPTMP
@@ -162,8 +163,8 @@ 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
+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