source: package_tags/xvm-db-backup/0.0.4/xvm-db-backup @ 2447

Last change on this file since 2447 was 2257, checked in by price, 15 years ago

tweak new xvm-db-backup filename format

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