The free forums are no longer in use. It remains available as read-only archive.
10:34 pm
January 30, 2013
Hi,
I have multiple cron jobs setup to send the backups to a remote FTP server. When I run the cron jobs manually from xcloner (from the cron tab, using the "execute cron" link next to each config file) they work perfectly... with the backup file landing safely on the remote ftp server.
But when the jobs are executed by cron the backups complete ok (and end up in the administrator\backups folder of the local host) but the FTP always fail with the error ftp_login() expects parameter 1 to be resource, boolean given
I have tried using the hostname and the IP address of the FTP server, and also using both the Direct and Passive mode FTP settings in xcloner. Just to re-iterate, the FTP works fine if I run the cron job from xcloner - it only fails when run via cron.
FYI regarding the cron jobs; they are being run from my GoDaddy hosting panel using the following code:
/web/cgi-bin/php5 "$HOME/html/<site name>/administrator/components/com_xcloner-backupandrestore/cloner.cron.php" db_backup.php
(this was the only format I could find that allowed the job to execute at all)
Many thanks for your help!
Matt
9:05 am
January 30, 2013
Unfortunately GoDaddy were not much help at all, but I have resolved the issue thanks to another forum post regarding GoDaddy vs CRON in general...
My fix, in case it should help anyone else in the future, was not to use /web/cgi-bin/php5 etc etc, but to call the cloner.cron.php file using wget, as follows:
/usr/bin/wget -O - -q "http://<website url>/administrator/components/com_xcloner-backupandrestore/cloner.cron.php?config=db_backup.php"
For whatever reason using PHP doesn't allow the FTP to work, but the above does 🙂
xCloner rocks, thank you for such an awesome plug-in !!
1 Guest(s)