hcoop-git-maint: Send output to /dev/null.
[hcoop/zz_old/misc/scripts.git] / hcoop-backup
index 3a65811..62076f1 100755 (executable)
@@ -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
@@ -64,12 +66,14 @@ diff allfiles debfiles | grep '^<' | cut -b 3- | \
  grep -v '^/usr/bin/.*\.notslocate$' | \
  grep -v '^/usr/lib/courier/.*\.rand$' | \
  grep -v '^/usr/lib/gconv/gconv-modules\.cache$' | \
+ grep -v '^/usr/lib/ghc[^/*]/package\.conf$' | \
+ grep -v '^/usr/lib/ghc[^/*]/package\.conf\.old$' | \
  grep -v '^/usr/lib/graphviz/config$' | \
  grep -v '^/usr/lib/locale/locale-archive$' | \
- grep -v '^/usr/share/info/dir$' | \
- grep -v '^/usr/share/info/dir\.old$' | \
  grep -v '^/usr/share/emacs21/site-lisp/' | \
  grep -v '^/usr/share/emacs22/site-lisp/' | \
+ grep -v '^/usr/share/info/dir$' | \
+ grep -v '^/usr/share/info/dir\.old$' | \
  grep -v '^/usr/share/snmp/mibs/\.index$' | \
  grep -v '^/usr/share/vim/addons/doc/tags$' \
  > backupfiles
@@ -161,8 +165,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
-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 && \