After hardware failure during Automated backup, courses that were skipped before keep getting skipped

After hardware failure during Automated backup, courses that were skipped before keep getting skipped

by Gerry F -
Number of replies: 4

I felt I should come back to the top and add this disclaimer.  I am always talking about automated backups.  I know I sometimes refer to it as backup in my description of the issue, but please know that I always mean automated backup. 

Experienced a hardware failure during an automated backup.  After getting everything put back together, I cleared out the backup folder to get fresh course backups however all courses that were skipped during the last successful backup were not created in the post hardware failure backups even though they don’t exist.

 The backup email digest sent before the hardware failure and the one sent after the server was operational again were identical:

 Summary

==================================================

Courses: 281

OK: 124

Skipped: 157

Error: 0

Unfinished: 0

Warning: 0

Automated backup pending: 0

 

Backup completed successfully

 I ran select * from moodle.mdl_backup_courses; in MySQL and found that every course that wouldn’t create a new backup had a “laststatus” of 3.  Do I need to go through and change them to a different status to get them back on track?  Or can I truncate the mdl_backup_courses table to get all fresh backups?  Any of the other backup tables, mdl_backup_controllers or mdl_backup_logs, need attention?

 I am not sure if this is a similar, but this user had a status stuck in Running and it was recommended to truncate the backup tables:

https://moodle.org/mod/forum/discuss.php?d=397529

and follow up here:

https://moodle.org/mod/forum/discuss.php?d=397529&parent=1603589

 

Thank you
Average of ratings: -
In reply to Gerry F

Re: After hardware failure during Automated backup, courses that were skipped before keep getting skipped

by Ken Task -
Picture of Particularly helpful Moodlers

Well, one could do 'exacto-knife' and change values in DB tables ... that's one way.

The other ... truncating all related tables ... moodle doesn't know automated backups have ever run ... like it was the first time.   So preferences for course backups (system wide) come into play ... users/no users, events/logging ... how long ... plus, if were me, I'd make sure I had space outside of moodledata/filedir/ where I could see the backup files and their sizes.   Got enough space for that?

Best way?  Dunno!   Works for me! ;)

'SoS', Ken

In reply to Ken Task

Re: After hardware failure during Automated backup, courses that were skipped before keep getting skipped

by Gerry F -
So do I only need to truncate the one table, mdl_backup_courses? That seems to be the one telling automated backups to keep skipping the same courses. It's 150+ courses that are being skipped so prefer something bigger than an exacto-knife wink

I guess I have an egg and chicken question. Is there a downside to truncating the mdl_backup_courses table? I would assume without anything in there, Moodle would think none of the courses were backed up and then backup all courses during the automated backup. OR, are courses added to that table when they are created with a laststatus code letting Moodle know they have never been backuped before? I guess that is why I wanted confirmation before wielding the axe.

FYI, I have the automated course backups going to seperate drive and not within moodledata.

I see you are enjoying retirement, if i read one of your older posts correctly. Thanks for hanging around here and continuing to help!
In reply to Gerry F

Re: After hardware failure during Automated backup, courses that were skipped before keep getting skipped

by Ken Task -
Picture of Particularly helpful Moodlers

At the time I did this on a K12 server, the tables for tracking what courses etc. were messed up.   About 3 references were next run dated for next year!!!!   Well, that wouldn't do ... one of those courses used daily.

My issue happened to be a digital media course that just kept growing - first noticed when backup was approaching 100Gig!   It finally reached 130Gig before I finally had to communicate with school admin and teacher.

Autobackups then broken up into 3 bash shell scripts and used admin/cli/backup.php with options ... small, medium, large ... the large had only 4 courses in it.   Couldn't do it daily ... but close enough (day or 2 work lost if a backup had to be used to restore ... never needed).

Retirement ... hmmmm ... fraid am past the 'golden years' of that!   We all grow old ... remember that! smile   [Note: so does software!!!!]

Best of luck with your choice! smile

Hangin' round means I can spot what doesn't work many times cause I've been there done that! sad

'SoS', Ken



In reply to Gerry F

Re: After hardware failure during Automated backup, courses that were skipped before keep getting skipped

by Gerry F -
Truncating only the mdl_backup_courses table did the trick. I cleared out my course backups folder and the next time automated backup ran it didn't skip any courses. It's now back on track.
Average of ratings: Useful (1)