[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] 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



---
 config/debian/cron.dinstall |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall
index 2478ed4..b8b25d7 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"
-- 
1.5.5.GIT


Reply to: