Ghost Autobackup???

Ghost Autobackup???

by Ken Task -
Number of replies: 4
Picture of Particularly helpful Moodlers

Am posting this on behalf of a Moodle admin who is shy!

And cannot disclose info that might be helpful ... but ...

Server is Linux and hosted on TMD ... has WHM and cPanel.

If cron is run, a backup of a large course is run.   Course has an assignment for students to upload video of themselves.   It is an ongoing never ending course, so many users and many users have done the assignment.

The backup fills up their data partition (moodledata/temp/backup/) and we can watch the files directory of that backup fill up.   They are apple .mov files.  And I can verify at least the mimetypes via file -b command.  Have to manually erase files to prevent filling up - thus backup never really builds the finished backup.mbz file.

Have truncated any tables in DB for scheduling autobackups ... have turned autobackups off in Admin UX + have a line in config.php that makes sure it's off, but ... the backup kicks in.

In viewing the actual course, that assignment isn't present ... not even hidden!!!

I cannot find where it's coming from!!! (GRRRRR!)   There is no other cron job that points to code/admin/cli/backup.php

So stupid question ... is the scheduling of backups cached somewhere else?   ahoc task?

Have never seen nor experienced similar!

Angry! :|

'SoS', Ken

Average of ratings: -
In reply to Ken Task

Re: Ghost Autobackup???

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Can you tell us the Moodle version?

I don't know TMD/WHM but is there shell access? If so can you use lsof to show the pid creating the file (maybe lsof moodledata/temp/backup) and then something like ps -eaf <PID> to see the what the ghost is (ps switches might depend on Linux flavour)?

In reply to Leon Stringer

Re: Ghost Autobackup???

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks, Leon ..

Moodle version 3.9.2+ - it has been upgraded through the years and there is evidence in config.php (password salt) and in mdl_files (a few legacy tagged files) so 1.9.x-> 2.x and beyond.

TMD is hosting.  WHM web hosting management ... a panel for server allocation.  cPanel is what is used for the server itself and where one would set up cron jobs.

I did kill the php process with kill -9 <psid> ... in a few seconds ... moodledata/temp/backup/ is populating again with more in files directory build.

Even found the table and the row for the assignment ... at least the one thought to be missing from the course when viewing via Moodle admin interface.

So far no luck ...

What do you suppose would happen if I removed that row that references that assignment?

The other way? ... find the submission files in mdl_files table + contenthash ... physically remove contenthash named file from moodledata/filedir/ Then remove the row in mdl_files.

That would have to be repeated over 1400+ times or there abouts.

Anyhoooo ... admins are working on strategy to rebuild the course from scratch ... when they finally get to the point of deleting the course is when we might see errors that give a clue!!!! :|

Thanks, Ken



In reply to Ken Task

Re: Ghost Autobackup???

by Ken Task -
Picture of Particularly helpful Moodlers

After digging and tinkering ...

The Assignment isn't showing in course.   It is, however, showing in grade book ... and when visiting gradebook:

Warning: Activity deletion in progress! Some grades are about to be removed.

cron/adhoc_task need to run to fix it.   But, catch 22,

When one runs command line adhoc_task the moodledata/temp/backup/ creates a 'files' directory and begins to populate with many/many/many user created videos.

Why?  Recyclebin.

This is causing a cascade of issues ... include orphaned files in moodledata/filedir/

How does one completely turn off recyclebin and prevent the adhoc task from executing anything it might have cued up?

'SoS', Ken


In reply to Ken Task

Re: Ghost Autobackup???

by Ken Task -
Picture of Particularly helpful Moodlers

Fixed!    GRRRRRRRRRR!

Ran adhoc.php via command line using nohup.

moodledata/temp/backup/[backupfolder]/files/ filling up with those assignment videos.   Not a Ghost ... had to do with the assignment grades in pending state.  Moodle trying to create a recyclebin backup - a very large one.

Turned off recyclebin

nohup still running so I guess by the time the process got to what to do with the backup,  moodle moved all the junk to trashdir (lucky me!!!).   Manually removed all folders/files in trashdir

cron job now running as it should - 1 time per minute.

Site Admins have been warned NOT to turn on Recyclebin.

Anyhoo ... once more ... re-enforces (for me at least) ... moodle admins need to learn some command line foo!  cause there was no way to fix this via GUI! (even with phpMyAdmin and cPanel)

Admin ... the 'forgotten' user in Moodle! :|

So am gonna say those who do Gig work on Moodles, still have value and a place in the eco system of Moodle.

'SoS', Ken