]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.dinstall
Compress all pgsql backups
[dak.git] / config / debian / cron.dinstall
index 6256e651f4596a07c029b83b4c9d7733d38cfc9f..95f5427b944bf11fadb8a71dbee0a6a8c355f950 100755 (executable)
@@ -247,14 +247,14 @@ apt-ftparchive -q clean apt.conf
 
 ts
 
-# Compress psql backups older than a week, but no more than 20 of them
+# Compress psql backups
 echo "Compress old psql backups"
 (cd $base/backup/
find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +7 | 
-   sort | head -n20 | while read dumpname; do
-     echo "Compressing $dumpname"
-     bzip2 -9 "$dumpname"
-   done
      find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' | 
+       while read dumpname; do
+               echo "Compressing $dumpname"
+               bzip2 -9 "$dumpname"
+       done
 )
 
 ts