allow migration between databases

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8796 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2011-02-06 13:05:19 +00:00
parent ffb252217c
commit 186781a22d
2 changed files with 8 additions and 2 deletions

View File

@ -1471,6 +1471,13 @@ sub createcfgloc
sub restorexcatdb
{
# set the env variable for Table.pm for the new database
my $xcatcfg;
my $cfgl;
open($cfgl,"<","/etc/xcat/cfgloc");
$xcatcfg = <$cfgl>;
close($cfgl);
chomp($xcatcfg);
# restore the database
xCAT::MsgUtils->message(
@ -1485,7 +1492,7 @@ sub restorexcatdb
}
# restore it
my $cmd = "XCATBYPASS=1 restorexCATdb -p $::backupdir";
my $cmd = "XCATBYPASS=1 XCATCFG=\"$xcatcfg\" restorexCATdb -p $::backupdir";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{

View File

@ -1664,7 +1664,6 @@ sub restorexcatdb
$xcatcfg = <$cfgl>;
close($cfgl);
chomp($xcatcfg);
$ENV{'XCATCFG'}=$xcatcfg;
# restore the database
xCAT::MsgUtils->message(