Automated course backup - not working - No logs have been found

Automated course backup - not working - No logs have been found

by Amer Imam -
Number of replies: 6

Moodle 3.11

Automated course backup setup was done as the procedure, and everything was set correctly.

But the backups didn't work and there is no logs in the backup repots.

Average of ratings: -
In reply to Amer Imam

Re: Automated course backup - not working - No logs have been found

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi,

You should really provide much more details :
  • where is you Moodle installed ?
  • is cron activated regularly ?
  • what are the automatic backup settings ?
  • how much time did you wait, or what have you done ?
  • ...
More details, more we can help. No details, no help...

Séverin
In reply to Séverin Terrier

Re: Automated course backup - not working - No logs have been found

by Clemens Arnold -

I've maybe got a similar problem. I have activated the automated backup as it is described in the documentation. Put on active, set a day and an time etc.

There is a cron job automated backups in the scheduled tasks. It runs hourly. But when the time arrives, it just says that the task has been run and that 4 things have been read but nothing has been written.

In the log file it says

Execute scheduled task: Automatische Sicherungen (core\task\automated_backup_task)
... started 20:50:01. Current memory use 20.9MB.
Checking automated backup status...OK
Checking courses
Skipping deleted courses...0 courses
Running required automated backups...
... started 20:50:01. Current memory use 42MB.
Getting admin info
Automated backups complete.
... used 4 dbqueries
... used 0.1585419178009 seconds
Scheduled task complete: Automatische Sicherungen (core\task\automated_backup_task)
which doesn't seem to me like it understands that it has to find hundreds of courses on our site. But no matter the size of the site, on my own Moodle site that I run for practice (we both have got Moodle 3.11) with only four courses the same thing happens so that somehow I believe that it's my fault, but what could it be? By the way, I waited hours for a result to come even for the big site, but nothing happens.

What I also ask myself: In the settings for the automated backup I determine a time for the backup and in the cron job as well. Which one is true? Have I maybe committed an error there?

You probably notice that I am quite new as an administrator, so please excuse me if my questions are quite silly.

Kind regards,
Clemens

In reply to Clemens Arnold

Re: Automated course backup - not working - No logs have been found

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Can you share a screenshot of your automated backup settings?
Average of ratings: Useful (1)
In reply to Clemens Arnold

Re: Automated course backup - not working - No logs have been found

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
A wild guess: If Site administration > Courses > Backups > Asynchronous backup/restore: Enable asynchronous backups (enableasyncbackup) is enabled, disable it and wait. Depending on how often the cron job is run, you'll have to wait days.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Automated course backup - not working - No logs have been found

by Clemens Arnold -
Thank you very much for your answers!
In between, it started working. I don't really know why it started working all of a sudden, maybe I didn't wait enough. Anyway: It seems that the task kind of tells the automated backup settings to execute or not whatever is definded there. I chose specially two different times of the day. When the task works, no backup is done, only at the time that I defined in the automated backup settings.
Kind regards,
Clemens
In reply to Clemens Arnold

Re: Automated course backup - not working - No logs have been found

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
The wild guess was based on a site I maintain. The automatic backup process stops every couple of months although there are other Moodle instances on the same server doing the automatic backup very reliably. The server is Ubuntu Linux 20.04 (LTS) running Apache 2.4 and PHP 7.4, and maintained up to date. All Moodle are from rel. 3.9, although the minor versions vary. The problematic Moodle is 3.9.10+ (Build: 20211015). The automatic back is invoked through running the script admin/cli/automated_backups.php daily through the crontab of www-data,

I don't know the cause of the problem. Once this happens I violently change the settings of automatic backups and rerun the script. Last time, restarting the process which stopped mid January weeks later, I disabled enableasyncbackup (amoung other changes). I too don't know what made it work. The automatic backups started a day later.