From: Joerg Jaspert Date: Sun, 15 Jun 2008 01:36:09 +0000 (+0200) Subject: To avoid dangling current symlink and have the latest dump easily readable - compress... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5596929fb40e247919844ccacd6970c20a69339b;p=dak To avoid dangling current symlink and have the latest dump easily readable - compress only psql dumps older than a day, ie keep todays ones uncompressed --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 2478ed4b..b8b25d7a 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -250,7 +250,7 @@ ts # Compress psql backups echo "Compress old psql backups" (cd $base/backup/ - find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' | + find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +1 | while read dumpname; do echo "Compressing $dumpname" bzip2 -9 "$dumpname"