Commit 50194e3e authored by Leigh Stoller's avatar Leigh Stoller

Save off the protogeni and imageserver databases (when appropriate).

parent 828aa4b1
#!/usr/bin/perl -wT
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -55,7 +55,8 @@ my $clean = 0;
my $TB = "@prefix@";
my $DBNAME = "@TBDBNAME@";
my $TBOPS = "@TBOPSEMAIL@";
my $MAINSITE = @TBMAINSITE@;
my $PGENISUPPORT= @PROTOGENI_SUPPORT@;
my $BACKUPDIR = "$TB/backup";
my $LOGDIR = "$TB/log/mysql";
my $HOTCOPY = "/usr/local/bin/mysqlhotcopy";
......@@ -280,8 +281,14 @@ else {
#
# Do a mysqldump. This will reset the log files.
#
my @DBNAMES = ($DBNAME);
push(@DBNAMES, "ims")
if ($MAINSITE);
push(@DBNAMES, ("geni", "geni-cm", "geni-ch"))
if ($PGENISUPPORT);
if (system("$MYSQLDUMP --create-options ".
"--flush-logs --lock-tables $DBNAME > $backname")) {
"--flush-logs --lock-tables --databases @DBNAMES > $backname")) {
fatal("mysqldump failed!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment