From: Evan Broder Date: Tue, 18 Nov 2008 02:03:24 +0000 (-0500) Subject: Write out the list of running VMs to AFS as well as the database backup X-Git-Tag: 0.0.2^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/xvm-db-backup.git/commitdiff_plain/9d477bb1e37203e4e75cd91a78a1dede890481a5?hp=9fea1d874594e1ea5ce43b182de1d48b7d0aceb3 Write out the list of running VMs to AFS as well as the database backup svn path=/trunk/packages/xvm-db-backup/; revision=1711 --- diff --git a/debian/changelog b/debian/changelog index b991ec9..f011489 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xvm-db-backup (0.0.2) unstable; urgency=low + + * Backup a list of currently running VMs as well as the database + + -- Evan Broder Mon, 17 Nov 2008 21:02:41 -0500 + xvm-db-backup (0.0.1) unstable; urgency=low * Initial Release. diff --git a/xvm-db-backup b/xvm-db-backup index 58a3323..80d6ae9 100755 --- a/xvm-db-backup +++ b/xvm-db-backup @@ -5,8 +5,12 @@ set -e kinit -k "daemon/$(hostname -f)" aklog sipb -filename="/mit/xvm/backups/db/prod/$(date +%Y-%m-%d-%H-%M.sql.gz)" +db_filename="/mit/xvm/backups/db/prod/$(date +%Y-%m-%d-%H-%M.sql.gz)" /usr/bin/pg_dump -U "$(invirt-getconf db.user)" \ -h "$(invirt-getconf db.host)" \ - "$(invirt-getconf db.dbname)" | gzip - >"$filename" + "$(invirt-getconf db.dbname)" | gzip - >"$db_filename" + +running_filename="/mit/xvm/log/running/prod/$(date +%Y-%m-%d-%H-%M.gz)" + +remctl "$(invirt-getconf remote.hostname)" web listvms | gzip - >"$running_filename"