#!/bin/sh # # Run once a week via cron, out of troup's crontab. set -e export SCRIPTVARS=/org/ftp.debian.org/katie/vars . $SCRIPTVARS ################################################################################ echo "Creating pre-weekly-cron-job backup of projectb database..." pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) ################################################################################ ### [JJT] Disabled until shania is rewritten #cd $masterdir #shania -v #shania -v -m -i $incoming # Purge empty directories if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then find $ftpdir/pool/ -type d -empty | xargs rmdir; fi # Clean up apt-ftparchive's databases apt-ftparchive clean apt.conf # TODO: weekly postins to d-c (?), backup of report (?), backup of changes.tgz (?) ################################################################################ echo "Creating post-weekly-cron-job backup of projectb database..." pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) ################################################################################