source: trunk/packages/xvm-db-backup/xvm-db-backup @ 2230

Last change on this file since 2230 was 1711, checked in by broder, 16 years ago

Write out the list of running VMs to AFS as well as the database backup

  • Property svn:executable set to *
File size: 468 bytes
RevLine 
[1656]1#!/bin/bash
2
3set -e
4
5kinit -k "daemon/$(hostname -f)"
6aklog sipb
7
[1711]8db_filename="/mit/xvm/backups/db/prod/$(date +%Y-%m-%d-%H-%M.sql.gz)"
[1656]9
10/usr/bin/pg_dump -U "$(invirt-getconf db.user)" \
11                 -h "$(invirt-getconf db.host)" \
[1711]12                 "$(invirt-getconf db.dbname)" | gzip - >"$db_filename"
13
14running_filename="/mit/xvm/log/running/prod/$(date +%Y-%m-%d-%H-%M.gz)"
15
16remctl "$(invirt-getconf remote.hostname)" web listvms | gzip - >"$running_filename"
Note: See TracBrowser for help on using the repository browser.