Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: Course backups not working in Moodle, but working in Moosh

$
0
0
by Richard van Iwaarden.  

Hi Ken,

We meet again. I should start paying you haha

OK, I will try to tell in more detail what I was trying to do. I want to get the nightly autobackups running again. This hasn't run for 6 months, it ran under Moodle 3.11 and stopped running under Moodle 4.2.2. I had hoped it was just Moodle 4.2.2 with this problem, but now we upgraded to Moodle 4.3.2 and the problem is still there. 

Since school hasn't started yet I have some time to invest in trying to fix it.

Our backups go to a folder /home/learn. This is where public_html and moodledata also are. The folder is called home/learn/coursebackups.

I deleted everything from mdl_backup_courses to start empty. Also I deleted everything in folder home/learn/coursebackups.

That should give me a fresh start.

We use a cronjob that runs every midnight. It does this: /usr/bin/screen -d -m -S learnbackup ~/learnbackup.sh

The contents of learnbackup.sh is:

/usr/local/bin/php -d log_errors=1 -d error_reporting=E_ALL -d display_errors=0 -d html_errors=0 -d memory_limit=2048M -d max_execution_time=36000 /home/learn/public_html/admin/cli/automated_backups.php > /home/learn/coursebackups/logs/cron.`date +%Y-%m-%d.%Hh%M`.txt

When I run this, it fills mdl_backup_courses with scheduled backups. For test purposes I adjusted the next run date far in the future except for one course, which should be backed up immediately.

This works OK, the backup proces starts of this one course. It goes to around 99% and then stops. The backups fails after 58 seconds. On /admin/tasklogs.php I can see the fail, but the log only says this:

Execute adhoc task: core\task\course_backup_task
Adhoc task id: 1177878
Adhoc task custom data: {"courseid":"22745","adminid":"4279"}
... started 11:30:29. Current memory use 37.3 MB.
Processing automated backup for course: Human Resource Management (CU34577V20)

It stops there.

Table mdl_backup_controllers says the status is 800.

In moodledata/temp/backup I see the folder with the controller hash. It contains these files:


So indeed, a backup.mbz is being created. I am wondering about the size though, because when I ran full backup from Moosh te backup was 1.21 GB. But auto-backup might be set to leave some stuff out (like legacy course files)

I will try to restore this 'uncomplete' backup.mbz as a new course and see what I get.

If it is the entire course... then I agree with your hypothesis that the problem is in the last step: copying from home/learn/moodledata/temp/backup to /home/learn/coursebackups.



Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>