]> git.decadent.org.uk Git - dak.git/commitdiff
Adjust security cron.daily to xz dumps and delete -mtime +30 ones
authorJoerg Jaspert <joerg@debian.org>
Thu, 10 Apr 2014 19:44:09 +0000 (21:44 +0200)
committerJoerg Jaspert <joerg@debian.org>
Thu, 10 Apr 2014 19:44:09 +0000 (21:44 +0200)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian-security/cron.daily

index ba4aaa6235b44edd048f54bb97e4c6a8198410cf..3476d7db556f3e115d2171c89352b714ec26bdbc 100755 (executable)
@@ -89,10 +89,10 @@ trap - EXIT
 
 symlinks -d -r $ftpdir
 
-pg_dump obscurity > /org/security-master.debian.org/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
-find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
-while read dumpname; do
-    bzip2 -9fv "$dumpname"
-done
+pg_file="${base}/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S)"
+pg_dump obscurity > "${pg_file}"
+nice xz -9 "${pg_file}"
+
+find "${base}/dak-backup" -mtime +30 \! -name '.nobackup' -delete
 
 ################################################################################