Skip to content

Commit

Permalink
Fix Database Backup Routine
Browse files Browse the repository at this point in the history
Database backups initiated from the UI currently fail if the SQL server
is not "localhost."  add the --host parameter to the mysqldump command
to use the database server specified in Include/Config.php.
  • Loading branch information
crossan007 committed Nov 25, 2015
1 parent 5d6e7d7 commit cff82fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion churchinfo/BackupDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
if ($bNoErrors)
{
$saveTo = "SQL/InfoCentral-Backup-" . date("Ymd-Gis") . ".sql";
$backupCommand = "mysqldump -u $sUSER --password=$sPASSWORD $sDATABASE > $saveTo";
$backupCommand = "mysqldump -u $sUSER --password=$sPASSWORD --host=$sSERVERNAME $sDATABASE > $saveTo";
exec($backupCommand, $returnString, $returnStatus);

switch ($iArchiveType)
Expand Down

0 comments on commit cff82fa

Please sign in to comment.