I am trying to set up an automatic db and files multiserver backup system and since all I know of Linux stops with Apache (1.3.31) I can't figure out what I'm doing wrong with the relative or absolute paths to have a php script run through cron. The script itself doesn't seem to be a problem; manual backups work allright.
**********************************************
Linux server (dns hostname) 2.4.21-40.EL #1 (all I could find in phpinfo)
Php 5.05 as Apache module
Access to cron through Cpanel GUI
No shell access
Host emergency 24X7 support ... dead
File permissions for script directory set to 755
***********************************************
Here is the script to be executed, bckpp.php:
Code:
<?php
// This code was created by phpMyBackupPro v.1.8
$_POST['db']=array("db_bcal", "db_cbr", "db_frm", );
$_POST['tables']="on";
$_POST['data']="on";
$_POST['drop']="on";
$_POST['zip']="gzip";
$period=(3600*24)*0;
$security_key="e9bb66605399852f9d91327e8b230977";
// This is the relative path to the phpMyBackupPro v.1.8 directory
@chdir("../bckp/");
(- and I tried this also
@chdir("/home/myusername/public_html/bckp/");)
@include("backup.php");
?>
"backup.php" being in
Now the cron command through Cpanel's GUI (frequency for test purpose only):
Code:
* * * * * curl -s -o /dev/null hxxp://xxx.domain.tld/tmp/bckpp.php
And the cron daemon's reply:
Code:
/bin/sh: line 1: backups: command not found
From various trials with many scripts remains a 'backups' folder at /home/myusername/backups and I tried to put the script inside with no result at all.
I also tried to create a cron.daily file in the etc folder (/home/myusername/etc/) with the code in it. Nothing ... but I haven't understood whether cron.daily is a file or some special directory.
Any help, anyone ? Thanks.