Jethro
Well-known member
Code:
<?php
$dbhost = 'host';
$dbuser = 'user';
$dbpass = 'password';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'database';
mysql_select_db($dbname) or die ("Database Selection Wrong");
$backupfile = "holycowitsdata.sql";
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupfile";
//echo($command);
system($command);
mysql_close($conn);
echo("done and dusted");
?>
It's generating the backupfile but is not actually dumping any data to it ....