
Backups of courses in moodle are not stored in moodledata/filedir/ with humanly recognizable names with extensions (like .mbz), but rather, by it's own file system.
What's your role in the moodle? Admin?
What path (what did you click upon) to arrive at what you show in your screen shot ... shows you are in a course.
Are you running auomated backups?
If so, what is the setting for "Automated backup storage". And is there anything in the 'Save to' box?
'SoS', Ken
I have automated backups turned on. It is set to store in the Course Backup File Area, and the Save to box is empty. I know it's working because on the Restore page, I can download the backup files. I just can't delete them if the manage files page won't load. It used to work, but I'm not exactly sure what changed in the past year.
Have you had debugging turned on to see if there is something going on?
All of your backups are going to moodledata/filedir/ ... but not by humanly recognizable names/extensions (.mbz). So, assuming you have something like phpmyadmin and could query the DB let's see what the following query shows:
select contenthash,filename,component from mdl_files where (filename like '%.mbz' and component= 'backup')
Example of what the query above should show:
contenthash filename component
35584c737a95f204c9180c9d34702919ccc1ed31 backup-moodle2-course-1-m311-20220420-1250.mbz backup
22e053ff117cd00262aa8e07eb4f73a6048af4ab backup-moodle2-course-2-sa-20220614-1550.mbz backup
c0e13307a6470613451a4453f2abde53ba8c49db backup-moodle2-course-2-sa-20220615-1550.mbz backup
The contenthash value is really the location in moodledata/filedir/ AND the name of the file in the Moodle file system.
Taking the first one above:
35584c737a95f204c9180c9d34702919ccc1ed31
is in moodledata/filedir/35/58/ and the filename is 35584c737a95f204c9180c9d34702919ccc1ed31
'SoS', Ken
select contenthash,filename,component from mdllc_files where (component= 'backup')
(Note: I'm a tutor who uses Moodle for online tutoring, but I know virtually nothing about website and db management, so this is an awesome learning opportunity for me. You're a great teacher!)
Thanks for compliment, but ... may have led you to a condition where your site now has 'orphaned files' in moodledata/filedir/!
So when you say:
"I deleted those and they no longer are showing in Moodle"
Deleted what - the rows in the DB? If you deleted the rows in the DB mdl_files table that's half of what you need to do ... you need also to remove the contenthash named files in moodledata/filedir/ - *very carefully* or you end up with 'orphaned files' (files in moodledata/filedir/ that Moodle now longer knows about nor displays)!
One should never have to do this really. And it's never a good idea to manipulate the DB manually.
So, sounds like the automated backup is confused?
There should be a report for automated backups. Check that out. Could be the scheduling is confused ... date for next run.
I know it's more work, but safer to deleted files in private area using the moodle admin interface!
Anyhoo ... clean up is first order of business ... then consider turning off autobackups and force yourself to do backups manually for a little while!
'SoS', Ken
However, the ones I really need to clean out are the manual backups, since I have duplicates of older courses. (I actually use manual backups much more than auto & have no problem turning off autobackup.) These backups don't show up in the database query that you gave me. Are they in a different location in the database?
( To recap - I'm unable to delete backups inside Moodle: The user private area backups shows 21 backup courses. I AM able to download these, but when I click "manage backups" the following page the list is empty. Similarly, when I click on the "Private Files" link in the dashboard, the list is empty.)
Change the query from:
select contenthash,filename,component from mdl_files where (filename like '%.mbz' and component= 'backup')
to
select contenthash,filename,component from mdl_files where filename like '%.mbz';
There is a plug in you might want to install to help short this out:
https://moodle.org/plugins/report_allbackups/versions
'SoS', Ken