Backup ignores host setting

yehster wrote on Wednesday, January 04, 2012:

The mysqldump created by interface/main/backup.php does not specify a host, so it can only work if php and mysql are on the same machine.

    // The substitutions below use perl because sed's not usually on windows systems.
    $perl = $PERL_PATH . DIRECTORY_SEPARATOR . 'perl';
    $cmd = "$mysql_dump_cmd -u " . escapeshellarg($sqlconf["login"]) .
      " -p" . escapeshellarg($sqlconf["pass"]) .
      " --opt --quote-names " .
      escapeshellarg($sqlconf["dbase"]) . " $tables" .
      " | $perl -pe 's/ DEFAULT CHARSET=utf8//i; s/ collate[ =][^ ;,]*//i;'" .
      " > $EXPORT_FILE;";

yehster wrote on Wednesday, January 04, 2012:

Fixed:
https://github.com/yehster/openemr/commit/375370a15311d5622c1747df1589be706047589b
https://github.com/yehster/openemr/tree/backupHost
added -h parameter for mysqldump

yehster wrote on Wednesday, January 04, 2012:

https://github.com/yehster/openemr/commit/e35a3dc476695c66243ad2d636cbaf4531895eac
Also disabling maximum execution time.

bradymiller wrote on Wednesday, January 04, 2012:

Hi,
Added both of these commits to sourceforge and will plan to include them in the next 4.1 patch.
thanks,
-brady