]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.daily
cron.daily: automatically bzip2 old backups
[dak.git] / config / debian / cron.daily
index 163a670484a5fca8abdc9b797020eef42619b2ae..059020eb8d521c6c0048876ed3d0396e8be01e7c 100755 (executable)
@@ -50,6 +50,20 @@ $scriptsdir/update-mailingliststxt
 
 ################################################################################
 
+TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
+cd $queuedir/p-u-new
+date -u -R >> REPORT
+dak process-new -a -C COMMENTS >> REPORT
+echo >> REPORT
+
+TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
+cd $queuedir/o-p-u-new
+date -u -R >> REPORT
+dak process-new -a -C COMMENTS >> REPORT
+echo >> REPORT
+
+################################################################################
+
 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
 lockfile $LOCKAC
 lockac=1
@@ -165,7 +179,7 @@ dak cruft-report | tee $webdir/cruft-report-daily.txt | mail -e -s "Debian archi
 
 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
 
-ulimit -m 90000 -d 90000 -s 10000 -v 90000
+ulimit -m 90000 -d 90000 -s 10000 -v 200000
 
 run-parts --report $base/scripts/distmnt
 
@@ -185,4 +199,16 @@ TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
 cd $configdir
 apt-ftparchive -q clean apt.conf
 
+TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
+
+# Compress psql backups older than a month, but no more than 20 of them
+
+(cd $base/backup/
+ find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +30 | 
+   sort | head -n20 | while read dumpname; do
+     echo "Compressing $dumpname"
+     bzip2 -9 "$dumpname"
+   done
+)
+
 ################################################################################