Re: Creating backup program (or problem with exec())
| From: | mailing_list at gmx dot at | Date: | Tue, 09 Jan 2001 21:10:59 +0000 |
| Subject: | Re: Creating backup program (or problem with exec()) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33544@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");
>
> ?>
try using the full path to your programs (you get them with the "which"
command!!)
for example not "tar" but "/bin/tar"
and check the directoy-rights where you want to write the files!
witty
--
Sent through GMX FreeMail - http://www.gmx.net