Index: /package_tags/xvm-db-backup/0.0.5/debian/changelog
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/changelog	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/changelog	(revision 2260)
@@ -0,0 +1,33 @@
+xvm-db-backup (0.0.5) unstable; urgency=low
+
+  * Fix a typo in the updated script.
+
+ -- Evan Broder <broder@mit.edu>  Tue, 17 Mar 2009 01:21:45 -0400
+
+xvm-db-backup (0.0.4) unstable; urgency=low
+
+  [ Evan Broder ]
+  * Make the directories we log to a little more manageable.
+
+  [ Greg Price ]
+  * Tweak the new filename format a bit.
+
+ -- Greg Price <price@mit.edu>  Mon, 16 Mar 2009 21:47:42 -0400
+
+xvm-db-backup (0.0.3) unstable; urgency=low
+
+  * Add cron dependency
+
+ -- Evan Broder <broder@mit.edu>  Thu, 20 Nov 2008 11:01:32 -0500
+
+xvm-db-backup (0.0.2) unstable; urgency=low
+
+  * Backup a list of currently running VMs as well as the database
+
+ -- Evan Broder <broder@mit.edu>  Mon, 17 Nov 2008 21:02:41 -0500
+
+xvm-db-backup (0.0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Evan Broder <broder@mit.edu>  Sat, 15 Nov 2008 11:34:36 -0500
Index: /package_tags/xvm-db-backup/0.0.5/debian/compat
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/compat	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/compat	(revision 2260)
@@ -0,0 +1,1 @@
+5
Index: /package_tags/xvm-db-backup/0.0.5/debian/control
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/control	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/control	(revision 2260)
@@ -0,0 +1,14 @@
+Source: xvm-db-backup
+Section: servers
+Priority: extra
+Maintainer: SIPB XVM Project <xvm@mit.edu>
+Build-Depends: cdbs, debhelper (>= 5)
+Standards-Version: 3.8.0
+
+Package: xvm-db-backup
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ debathena-kerberos-config, debathena-afs-config,
+ openafs-client, postgresql-client-common, cron
+Description: Configure the database backup on XVM servers
+ Backup the XVM database to AFS hourly
Index: /package_tags/xvm-db-backup/0.0.5/debian/copyright
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/copyright	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/copyright	(revision 2260)
@@ -0,0 +1,17 @@
+This software was written for the XVM project <xvm@mit.edu>
+of the MIT Student Information Processing Board.
+
+Copyright :
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file /usr/share/common-licenses/GPL.
Index: /package_tags/xvm-db-backup/0.0.5/debian/rules
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/rules	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/rules	(revision 2260)
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Index: /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.cron.hourly
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.cron.hourly	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.cron.hourly	(revision 2260)
@@ -0,0 +1,3 @@
+#!/usr/bin/pagsh
+
+exec /usr/sbin/xvm-db-backup
Index: /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.install
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.install	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/debian/xvm-db-backup.install	(revision 2260)
@@ -0,0 +1,1 @@
+xvm-db-backup usr/sbin
Index: /package_tags/xvm-db-backup/0.0.5/xvm-db-backup
===================================================================
--- /package_tags/xvm-db-backup/0.0.5/xvm-db-backup	(revision 2260)
+++ /package_tags/xvm-db-backup/0.0.5/xvm-db-backup	(revision 2260)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+kinit -k "daemon/$(hostname -f)"
+aklog sipb
+
+db_filename="/mit/xvm/backups/db/prod/$(date +%Y/%m/%d.%H%M.sql.gz)"
+mkdir -p "$(dirname $db_filename)"
+
+/usr/bin/pg_dump -U "$(invirt-getconf db.user)" \
+                 -h "$(invirt-getconf db.host)" \
+                 "$(invirt-getconf db.dbname)" | gzip - >"$db_filename"
+
+running_filename="/mit/xvm/log/running/prod/$(date +%Y/%m/%d.%H%M.gz)"
+mkdir -p "$(dirname $running_filename)"
+
+remctl "$(invirt-getconf remote.hostname)" web listvms | gzip - >"$running_filename"
