Reputation: 215
we are using Akeeba Backup for backing up our Joomla website. It is possible to start a backup just by calling an URL as described here: https://www.akeebabackup.com/documentation/quick-start-guide/automating-the-backup.html. To automate the backup of our site we want to call this URL using a daily executed Cron job. Our web hoster supports the creation of Cron jobs, but you cannot use any shell scripts or something. Only the execution of a PHP script is supported. So we have to call this URL using a PHP script. I created this script and it works fine when calling it directly using my browser. But when I try to execute it using the Cron job I only receive error 302, which means, that the document has temporarily moved. I don't know what to do with that. This is the script I want to execute:
<?php
$result = file_get_contents("http://www.mysite.net/index.php?option=com_akeeba&view=backup&key=topsecret&format=r");
?>
I am not experienced with Cron jobs or PHP so any help would be nice.
Thanks for your time.
Upvotes: 0
Views: 1209
Reputation: 111
It suffices to read the documentation. It tells you exactly how to use wget or curl for use with a CRON job. Moreover, there is a section called "A PHP alternative to wget". I write the documentation of Akeeba Backup and make available free of charge for a good reason: to be read and prevent such questions ;)
Upvotes: 1