Skip to content

Commit 7f24bce

Browse files
committed
N°7150 - Backup : on MariaDB >= 11.0.1 call mariadb-dump instead of mysqldump - fix setup
1 parent 4ecf81d commit 7f24bce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setup/setuputils.class.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,14 @@ public static function CheckBackupPrerequisites($sDBBackupPath, $sMySQLBinDir =
559559
$aResult[] = new CheckResult(CheckResult::ERROR, "The PHP exec() function has been disabled on this server");
560560
}
561561

562+
MetaModel::LoadConfig(utils::GetConfig());
562563
// availability of mysqldump
563564
if (empty($sMySQLBinDir) && null != MetaModel::GetConfig()) {
564565
$sMySQLBinDir = MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', '');
565566
}
566567
try {
568+
$oConfig = MetaModel::GetConfig();
569+
CMDBSource::InitFromConfig($oConfig);
567570
$sMySQLDump = DBBackup::MakeSafeMySQLCommand($sMySQLBinDir, DBBackup::GetDumpFunction());
568571
} catch (Exception $e) {
569572
$aResult[] = new CheckResult(CheckResult::ERROR, $e->getMessage());

0 commit comments

Comments
 (0)