backup hashfile not moving to trashdir

backup hashfile not moving to trashdir

by Ehsan Anwar -
Number of replies: 5

When deleting a backup from the course backup area in moodle, the associated hash file in the filedir folder does not move to the trashdir as it should, it stays in its associated filedir folder.  Is there a reason for this?  My cron is enabled and running as normal

 

Regards

Ehsan


Average of ratings: -
In reply to Ehsan Anwar

Re: backup hashfile not moving to trashdir

by Ken Task -
Picture of Particularly helpful Moodlers

Cron and **related 'clean up' task** in task list must run before files are moved from filedir to trashdir.

Also, if that backup file is linked in more one place, it will remain until all links to it are also deleted.

'spirit of sharing', Ken


In reply to Ehsan Anwar

Re: backup hashfile not moving to trashdir

by Ken Task -
Picture of Particularly helpful Moodlers

Just remenbered a quirk I had experienced .... but it has to have certain conditions .... course with multiple teachers assigned to the course.   Super Admin user could see and delete a course backup that was seen by that user, but if a teacher made a backup of that course, that backup file was referenced in their private files - super user didn't see the reference.    Had to login as that teacher to see the backup they made in order to delete it.

'spirit of sharing', Ken


In reply to Ken Task

Re: backup hashfile not moving to trashdir

by Ehsan Anwar -

as a test i created my own course and created a backup so i know the backup is not being used elsewhere.  I have checked the cron and all related clean up tasks are enabled and running.  Would you happen to know whick cron task moves files from filedir to traskdir?

In reply to Ehsan Anwar

Re: backup hashfile not moving to trashdir

by Ken Task -
Picture of Particularly helpful Moodlers

Look for 'clean up' in the task list ... read the descriptions of the task.   There isn't one that specifically moves files from filedir to trashdir.

There is a command line tool for Moodle called 'moosh' https://moosh-online.com/commands/

There are a few 'file' commands you might want to explore.

'spirit of sharing', Ken