mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 00:32:16 +02:00
Retrofit from trunk
N°1191 - Wrong file name for backup check. [from revision 5143] N°1188 - Backup needs too much disk space [from revision 5144] N°1190 - Better error reporting and disk cleanup. [from revision 5145] License reformat. [from revision 5146] N°1188 & N°1189 Too much disk space / memory used for backup / restore - completing the commit [r5144], because the PHP extension phar is no more required [from revision 5151] SVN:2.4[5233]
This commit is contained in:
@@ -61,6 +61,7 @@ try
|
||||
catch (Exception $e)
|
||||
{
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
$oPage->output();
|
||||
@@ -156,6 +157,7 @@ EOF
|
||||
{
|
||||
$oRestoreMutex->Unlock();
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
$oPage->output();
|
||||
@@ -179,6 +181,6 @@ EOF
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
IssueLog::Error($e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ catch(Exception $e)
|
||||
exit;
|
||||
}
|
||||
|
||||
$sZipArchiveFile = MakeArchiveFileName();
|
||||
$sZipArchiveFile = MakeArchiveFileName().'.tar.gz';
|
||||
echo date('Y-m-d H:i:s')." - Checking file: $sZipArchiveFile\n";
|
||||
|
||||
if (file_exists($sZipArchiveFile))
|
||||
@@ -223,7 +223,7 @@ if (file_exists($sZipArchiveFile))
|
||||
if ($iSize > $iMIN)
|
||||
{
|
||||
echo "Found the archive\n";
|
||||
$sOldArchiveFile = MakeArchiveFileName(time() - 86400); // yesterday's archive
|
||||
$sOldArchiveFile = MakeArchiveFileName(time() - 86400).'.tar.gz'; // yesterday's archive
|
||||
if (file_exists($sOldArchiveFile))
|
||||
{
|
||||
if ($aOldStat = stat($sOldArchiveFile))
|
||||
|
||||
@@ -131,7 +131,7 @@ class DBRestore extends DBBackup
|
||||
$oArchive->extractFileTo($sDataDir, 'itop-dump.sql');
|
||||
$sDataFile = $sDataDir.'/itop-dump.sql';
|
||||
$this->LoadDatabase($sDataFile);
|
||||
unlink($sDataFile);
|
||||
SetupUtils::rrmdir($sDataDir);
|
||||
|
||||
// Update the code
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user