I normally use phpMyAdmin to backup databases, but it would be nice to allow the website owner to just click on a button to back it all up. They don't want to deal with PMA which is probably a good thing, but otherwise I have to do the backups.
I tried this but get the message "Notice: Backup failed: 1 in [path] on line 6 ":
[PHP]<?php
require_once('[path]/dbConnect.php'); // gets user,pass,host
$connector = new dbConnector();
$destination = "[path]/textfile.sql";
$dumpit = 'mysqldump -u ' . $user . ' -p=' . $pass . ' -h ' . $host .' -A -Q -e > ' . $destination;
system($dumpit, $error);
if ($error) { trigger_error('Backup failed: ' . $error); }
?>[/PHP]
I echoed the variables to make sure the paths and commands are okay. Help please?