N°7150 - Backup : on MariaDB >= 11.0.1 call mariadb-dump instead of mysqldump - fix setup

This commit is contained in:
Anne-Cath
2026-02-27 17:24:31 +01:00
parent 4ecf81d032
commit 7f24bcedd8

View File

@@ -559,11 +559,14 @@ class SetupUtils
$aResult[] = new CheckResult(CheckResult::ERROR, "The PHP exec() function has been disabled on this server");
}
MetaModel::LoadConfig(utils::GetConfig());
// availability of mysqldump
if (empty($sMySQLBinDir) && null != MetaModel::GetConfig()) {
$sMySQLBinDir = MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', '');
}
try {
$oConfig = MetaModel::GetConfig();
CMDBSource::InitFromConfig($oConfig);
$sMySQLDump = DBBackup::MakeSafeMySQLCommand($sMySQLBinDir, DBBackup::GetDumpFunction());
} catch (Exception $e) {
$aResult[] = new CheckResult(CheckResult::ERROR, $e->getMessage());