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

automated backups failing - sharing resolution

$
0
0
by Ken Task.  

For months have been getting daily email notifications that one or two courses didn't complete.  Finally decided it's time to investigate/fix.

CentOS: el6.x86_64 16 Gig memory
PHP vr PHP 5.5.30, MySQL 5.5.32

Moodle version: 2.8.9+ (Build: 20151119)

Small site: only 17 courses (this to say, what I've done with this site may/may NOT work for larger sites)

Inspecting moodledata/temp/backup/
would find hashnamed directories that were used to build the backups
with no moodle_backup.xml file in them.  In other words, in-complete
backup attempts.

The scheduled task cron job to clean up not working.
Believe this is due to the backups never completing so Moodle
never really knew to clean up.

Resolution:

1. truncated all the data contained in the following tables:
mdl_backup_controllers
mdl_backup_courses
mdl_backup_logs
Tables remain ... just removed all the rows/records that contained any status/tracking/dates/ etc. info about courses and backups.

2. set automated backups 'active' to 'manual'.  Unchecked Skip hidden
Skip courses not modified set to 'NEVER'.
(desired to get at least ONE backup of every course then would go back and
reset those items)

3. in scheduled task - disabled:
Automated backups \core\task\automated_backup_task
Clean backup tables and logs \core\task\backup_cleanup_task
The latter set to:
10     *     *     *     *     0

4. manually removed all directories/ .log files in moodledata/temp/backup/

5. purged caches

6. Ran, from command line, the moodlecode/admin/cli/ automated_backukp.php script

In one course - the largest and the one containing the most number of
quizzes/test watched the contenthash/activites directory creation via linux command:
watch "ls -l" and discovered many, many, many quizzes.
That course finally backed up ... that one course took about 1 hour alone.
When watch could see the .xml files being created ... good sign ... close to
completing.

*** and for the first time in months ... ***

Sending email to admin
Automated backups complete.
Automated cron backups completed correctly
Execution took 2600.372029 seconds

And the Email notification:

Summary
==================================================
  Courses; 17
  OK; 17
  Skipped; 0
  Error; 0
  Unfinished; 0
  Warning; 0
  Automated backup pending; 0

  Backup completed successfully

Changed php max_exection_time to 2700 seconds from default of 30 - yeah, I know ...

Re-set automated backups to enabled, start at 0:05, skip hidden courses
skip courses not modified since 30 days.
But left, disabled, the scheduled task.

Will have to wait a day to see if it runs without error.

But, it's progress (I think!)

'spirit of sharing', Ken


Viewing all articles
Browse latest Browse all 6621

Trending Articles



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