* Let the config file specify a list of tables to exclude from the
backup.
svn path=/trunk/packages/xvm-db-backup/; revision=2536
+xvm-db-backup (0.0.6) unstable; urgency=low
+
+ * Let the config file specify a list of tables to exclude from the
+ backup.
+
+ -- Evan Broder <broder@mit.edu> Mon, 26 Oct 2009 10:14:47 -0400
+
xvm-db-backup (0.0.5) unstable; urgency=low
* Fix a typo in the updated script.
db_filename="/mit/xvm/backups/db/prod/$(date +%Y/%m/%d.%H%M.sql.gz)"
mkdir -p "$(dirname $db_filename)"
+exclude=()
+if invirt-getconf db.backup_exclude &>/dev/null; then
+ for i in invirt-getconf -l db.backup_exclude; do
+ exclude=("${exclude[@]}" -T "$(invirt-getconf "db.backup_exclude.$i")")
+ done
+fi
/usr/bin/pg_dump -U "$(invirt-getconf db.user)" \
-h "$(invirt-getconf db.host)" \
+ "${exclude[@]}" \
"$(invirt-getconf db.dbname)" | gzip - >"$db_filename"
running_filename="/mit/xvm/log/running/prod/$(date +%Y/%m/%d.%H%M.gz)"