Hi
I've been trying to get a mysqldump command to work but it just creates an empty file.
here's the code :
$dbhost = "xxx";
$dbuser = "xxx";
$dbpass = "xxx";
$dbname = "xxx";
$backupFile = $dbname . date("Y-m-d") . '.gz';
$command = "mysqldump --opt -h $dbhost -u $dbuser -p$dbpass $dbname | gzip > $backupFile";
can anyone see a reason why this doesn't work?
or is there a better way of writing it ?
thanks!