Fix metadata not always being created on backup.
This commit is contained in:
@@ -1999,8 +1999,18 @@ function run_workspace_backup($task, $args) {
|
||||
$row = $rs->getRow();
|
||||
$mysqlVersion = $row[0];
|
||||
$aSerializeData['DATABASE'] = $mysqlVersion;
|
||||
$fileMetadata = PATH_TRUNK . 'backups' . PATH_SEP . 'metadata.txt';
|
||||
|
||||
//new db restore rotines, by Erik <erik@colosa.com> on May 17th, 2010
|
||||
//set the temporal directory for all tables into wf, rb, and rp databases
|
||||
$tmpDir = G::getSysTemDir() . PATH_SEP . 'pmDbBackup' . PATH_SEP;
|
||||
//create the db maintenance temporal dir
|
||||
G::mk_dir($tmpDir);
|
||||
|
||||
$fileMetadata = $tmpDir . 'metadata.txt';
|
||||
$sMetadata = file_put_contents($fileMetadata, serialize($aSerializeData));
|
||||
if ($sMetadata === false) {
|
||||
throw new Exception("Metadata file could not be written");
|
||||
}
|
||||
|
||||
G::LoadThirdParty('pear/Archive', 'Tar');
|
||||
|
||||
@@ -2008,12 +2018,6 @@ function run_workspace_backup($task, $args) {
|
||||
if (!isset($gzipPath))
|
||||
$tar->_compress = $compress;
|
||||
|
||||
//new db restore rotines, by Erik <erik@colosa.com> on May 17th, 2010
|
||||
//set the temporal directory for all tables into wf, rb, and rp databases
|
||||
$tmpDir = G::getSysTemDir() . PATH_SEP . 'pmDbBackup' . PATH_SEP;
|
||||
//create the db maintenance temporal dir
|
||||
G::mk_dir($tmpDir);
|
||||
|
||||
/*** WORKFLOW DATABASE BACKUP ***/
|
||||
$dbSettings = getDataBaseConfiguration($configuration['datasources']['workflow']['connection']);
|
||||
backupDB($dbOpt[0], $dbOpt[1], $dbOpt[2], $dbSettings['dbname'], $tmpDir);
|
||||
|
||||
Reference in New Issue
Block a user