mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Make setup backup location and name similar as other backups (#61)
This commit is contained in:
committed by
Pierre Goiffon
parent
da6791d75f
commit
6e8bcf7b69
@@ -460,11 +460,12 @@ class SetupUtils
|
||||
|
||||
/**
|
||||
* Check that the backup could be executed
|
||||
* @param $sDestDir
|
||||
* @param $sDBBackupPath
|
||||
* @param $sMySQLBinDir
|
||||
* @return array An array of CheckResults objects
|
||||
* @internal param Page $oP The page used only for its 'log' method
|
||||
*/
|
||||
static function CheckBackupPrerequisites($sDestDir, $sMySQLBinDir = null)
|
||||
static function CheckBackupPrerequisites($sDBBackupPath, $sMySQLBinDir = null)
|
||||
{
|
||||
$aResult = array();
|
||||
SetupPage::log('Info - CheckBackupPrerequisites');
|
||||
@@ -529,6 +530,15 @@ class SetupUtils
|
||||
{
|
||||
SetupPage::log('Info - mysqldump -V said: '.$sLine);
|
||||
}
|
||||
|
||||
// create and test destination location
|
||||
//
|
||||
$sDestDir = dirname($sDBBackupPath);
|
||||
setuputils::builddir($sDestDir);
|
||||
if (!is_dir($sDestDir))
|
||||
{
|
||||
$aResult[] = new CheckResult(CheckResult::ERROR, "$sDestDir does not exist and could not be created.");
|
||||
}
|
||||
|
||||
// check disk space
|
||||
// to do... evaluate how we can correlate the DB size with the size of the dump (and the zip!)
|
||||
|
||||
Reference in New Issue
Block a user