hcoop-backup: Only keep 2 backup runs lying around.
[clinton/scripts.git] / hcoop-backup
index 2f5c794..0d1d520 100755 (executable)
@@ -44,8 +44,8 @@ function copy_over () {
 }
 
 cd $BACKUPDIR
-find . -mindepth 1 -maxdepth 1 -type d -ctime +3 -delete || true
-
+find . -mindepth 1 -maxdepth 1 -type d -ctime +7 \
+    -execdir rm -fr '{}' \; || true
 rm -rf $SUBDIR
 mkdir -p $SUBDIR
 mkdir -p $BACKUPTMP
@@ -92,6 +92,7 @@ diff allfiles debfiles | grep '^<' | cut -b 3- | \
  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/snmp/mibs/\.index$' | \
  grep -v '^/usr/share/vim/addons/doc/tags$' \
  > backupfiles