I want to backup the database as gzip, but it doesn’t work. This is the command:
$backup = $location.'/'.$database.'_backup_'.date('Y').'_'.date('m').'_'.date('d').'.sql.gz';
$cmd = "c:/xampp/mysql/bin/mysqldump --opt -h localhost -u root $database | gzip -9 > $backup";
system($cmd);
But it doesn’t happen anything. If I’m doing it without gzip, it works, why ?
You have to use full path to
gzip.exe.