diff --git a/datamodels/2.x/itop-backup/ajax.backup.php b/datamodels/2.x/itop-backup/ajax.backup.php index fad2b1936..62e797c00 100644 --- a/datamodels/2.x/itop-backup/ajax.backup.php +++ b/datamodels/2.x/itop-backup/ajax.backup.php @@ -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()); } diff --git a/datamodels/2.x/itop-backup/dbrestore.class.inc.php b/datamodels/2.x/itop-backup/dbrestore.class.inc.php index 09a146eee..b8809d11a 100644 --- a/datamodels/2.x/itop-backup/dbrestore.class.inc.php +++ b/datamodels/2.x/itop-backup/dbrestore.class.inc.php @@ -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 //