Creating backup program (or problem with exec())
| From: | CDitty | Date: | Tue, 09 Jan 2001 20:25:40 +0000 |
| Subject: | Creating backup program (or problem with exec()) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-33535@lists.php.net to get a copy of this message | ||
Hello all.
I am writing a small backup program and am having problems. For some reason, no matter what I try, the exec() won't work. If I remove the variable and put in the actual text, it works fine. Any tips?
<?
$backup_date = date("mdY");
$backup_date = "redhot" . $backup_date;
$backup_path = "/home/httpd/html/sweeps/";
$backup_to = $backup_path . "stats/backups/";
exec("tar --exclude=stats -cf " . $backup_to . $backup_date . ".tar $backup_path");
//exec("gzip /backup.tar");
//exec("mv /backup.tar.gz /public_html/backup.tar.gz");
?>
Thanks
CDitty