[align=LEFT][align=CENTER]Mysql Database dump[/align]
[php]
<?php
$dbhost = "localhost";
$dbuser = "Root_data";
$dbpwd = "password";
$dbname = "Database name";
$dumpfile = $dbname . "_" . date("Y-m-d_H-i-s") . ".sql";
passthru("/usr/bin/mysqldump --opt --host=$dbhost --user=$dbuser --password=$dbpwd $dbname > $dumpfile");
// report - disable with // if not needed
// must look like "-- Dump completed on ..."
echo "$dumpfile "; passthru("tail -1 $dumpfile");
?>
[/php][/align]
[php]
<?php
$dbhost = "localhost";
$dbuser = "Root_data";
$dbpwd = "password";
$dbname = "Database name";
$dumpfile = $dbname . "_" . date("Y-m-d_H-i-s") . ".sql";
passthru("/usr/bin/mysqldump --opt --host=$dbhost --user=$dbuser --password=$dbpwd $dbname > $dumpfile");
// report - disable with // if not needed
// must look like "-- Dump completed on ..."
echo "$dumpfile "; passthru("tail -1 $dumpfile");
?>
[/php][/align]