Automated backup doesn`t work

Automated backup doesn`t work

by Christian Wurzer -
Number of replies: 9

The automated backup doesn`t work in my new 2.5.1 installation.

 

I´ve enabled the automated backup in courses/backups/automated... and left everything else by the default values. 

 

In the server console I typed

crontab -e

and wrote: 

*/30 * * * * wget -q -O /dev/null http://www.xyz.at/moodle2013/admin/cron.php

 

But there are no backups in the courses and there is no log in Reports/backups.

I`ve changed the backup_auto_destination to \backup where wwwrun is the owner and www the group. No success.

 

Anyone any idea? 

Average of ratings: -
In reply to Christian Wurzer

Re: Automated backup doesn`t work

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Try running cron automatically and see what it is doing (go to www.yourmoodlesite.com/admin/cron.php.  Also, you say you left everything default but you have to select when the backups will run.  If you have not selected any days, then you have not told cron when to run.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Automated backup doesn`t work

by Christian Wurzer -

Thank you for the answer.

Yes, I´ve activated monday, tuesday,...friday.

Right now, I`ve started the www.yourmoodlesite.com/admin/cron.php script and it says: 

...

Backup of '1314_BIU-2M' is scheduled on Mon, 23 Sep 2013 17:10:00 +0200
Skipping 1314_BIU-2M (Does not require backup)
....

In Reports/backup there is now a log file - yippie, but it says, that every course is skipped. 

The complete file is in the attachment.

Thank you,

Christian

 

 

 

 

In reply to Christian Wurzer

Re: Automated backup doesn`t work

by Tim Dyer -

I believe that's the wrong information to run. It should say something like:

/usr/bin/php /path/to/moodle/admin/cli/cron.php

 The URL you have is web based. You can copy and paste that into a browser and run it.

In reply to Christian Wurzer

Re: Automated backup doesn`t work

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So, now check your backup settings - you probably have it set to automatically skip courses if they have not been changed in so many days.  Make sure that you uncheck all the skip options and then run again.

In reply to Emma Richardson

Re: Automated backup doesn`t work

by Christian Wurzer -

I have changed the option to not skip automatically ... - as  you proposed - and entered .../admin/cron.php and the backup worked. I install a new version every year and I´ve never clicked this option in the last years. Anyway, now it works. Thank you Emma!

Now, I wait If my cronjob works... Please keep your fingers crossed.

Christian

In reply to Christian Wurzer

Re: Automated backup doesn`t work

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Will do - good luck!

In reply to Emma Richardson

Re: Automated backup doesn`t work

by Christian Wurzer -

Hm, my cronjob didn`t work.

I have activated the .../admin/cron.php for a parallel (from last year) 2.3 moodle (where everything worked fine) in my cronjob to see, if the backup in this moodle 2.3 installation works. So I should see, if there`s a problem with my cron tool. 

 

In reply to Christian Wurzer

Re: Automated backup doesn`t work

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Try this - first run cron as your website user -  for example, in linux from terminal 

crontab -u www-data -e

Then add the command with cli as noted above

So it should read:

*/30**** /usr/bin/php /var/www/moodle/admin/cli/cron.php >/dev/null

It looks like you were directing to the website instead of the actual folder plus on 2.0 plus you do need the cli reference.

In reply to Emma Richardson

Re: Automated backup doesn`t work

by Christian Wurzer -

Thank you - I have made the changes an I will report what happens in the night when the backup should start.