Trying to backup a mysql db, if I use "tar -czf" the server gets taken over with an out of control process.

Specifically, what I'm trying to do is
if($use_gzip=="yes"){
$zipline = "tar -czf ".$dbname."-".$date."_sql.tar.gz $dbname-$date.sql";
shell_exec($zipline);
}
in a php script.

Any suggestion on what I should use instead?
Hows bzip2?