From: Joerg Jaspert Date: Thu, 10 Apr 2014 19:44:09 +0000 (+0200) Subject: Adjust security cron.daily to xz dumps and delete -mtime +30 ones X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e0b278fa0638b0da6919159a33fe9cd5ce87a819;hp=dbdb063629442012c56fa90517d221aa9aa1a622;p=dak.git Adjust security cron.daily to xz dumps and delete -mtime +30 ones Signed-off-by: Joerg Jaspert --- diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index ba4aaa62..3476d7db 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -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 ################################################################################