{
$link = mysql_connect($host,$user,$pass);
mysql_select_db($name,$link);
mysql_query("SET NAMES utf8");
$backupFile = $name . date("Y-m-d-H-i-s") . '.gz';
$command = "mysqldump --opt --host=$host --user=$user --password=$pass $name | gzip > $backupFile";
system($command);
mysql_close($link);
}