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

Advice on mass deleting backup files

$
0
0

by Ehsan Anwar.  

Our users create backups of their courses but forget to delete resulting in our moodle data filling up.  I would like to create a simple php file that will run with the cron daily and delete any course backups that are over a certain period.  These are backups manually made by the user and are not automated backups.  I understand how the mdl_files tables associate with the moodle data through the contenthash; that when deleting a backfile through moodle, the file moves from fildir folder to trashdir to be deleted after 24 hours. 

I did a test and created a course and a backfile not used anywhere else.  Using a sql delete command I delete the id from the mdl_file tables but when checking filedir it has stayed there rather than going to trashdir so presume i'll need to use the file delete function.

Does anyone know where the function is located that is used for the delete confirmation box when deleting files (screenshot attached)?


Regards

Ehsan



Viewing all articles
Browse latest Browse all 6621

Trending Articles



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