RE:como hacer un backup d mysql
hola, ahi tienes un ejemplo:
<?php
$bd=mibd;
$link=mysql_connect("localhost","root","");
$filename=$bd.".sql";
mysql_select_db($bd,$link);
mysql_query("mysqldump --opt $bd> $filename",$link);
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Transfer-Encoding: binary");
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=$filename");
readfile($filename);
unlink($filename);
?>
suerte y saludos
José A