archive the directory from 2 months ago, leaving only the last
month accessible directly
sudo -u dak-unpriv touch run/log
xz -9 log.${OLDDATE}
sudo -u dak-unpriv /srv/upload.debian.org/queued/debianqueued 2>/dev/null
+}
+
+function archivequeuedone() {
+ log "Archiving queue/done files of ${DONEYEAR}-${DONEMONTH}"
+ cd ${queuedir}/done/${DONEYEAR}
+ tar --create --xz --remove-files --file ${DONEMONTH}.tar.xz ${DONEMONTH}
}
\ No newline at end of file
# FUNC ARGS TIME ERR BG
rotatelog none none false true
-rotatequeued none none false true
\ No newline at end of file
+rotatequeued none none false true
+archivequeuedone none none false true
# -*- mode:sh -*-
DATE=$(date +%Y-%m)
OLDDATE=$(date -d yesterday +%Y-%m)
+
+DONEYEAR=$(date -d '2 months ago' +%Y)
+DONEMONTH=$(date -d '2 months ago' +%m)
\ No newline at end of file