N°8379 - fix backup issue

This commit is contained in:
jf-cbd
2025-05-13 16:05:39 +02:00
parent 5232694c04
commit 960133c0df
4 changed files with 25 additions and 37 deletions

View File

@@ -484,16 +484,15 @@ class SetupUtils
{
$sMySQLBinDir = MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', '');
}
if (empty($sMySQLBinDir))
{
$sMySQLDump = 'mysqldump';
}
else
{
SetupPage::log('Info - Found mysql_bindir: '.$sMySQLBinDir);
$sMySQLDump = '"'.$sMySQLBinDir.'/mysqldump"';
try {
$sMySQLDump = DBBackup::MakeSafeMySQLCommand($sMySQLBinDir, 'mysqldump');
} catch (Exception $e) {
$aResult[] = new CheckResult(CheckResult::ERROR, $e->getMessage());
return $aResult;
}
if (!empty($sMySQLBinDir)) {
SetupPage::log('Info - Found mysql_bindir: '.$sMySQLBinDir);
}
$sCommand = "$sMySQLDump -V 2>&1";
$aOutput = array();