General developer forum

Mightily confused by file storage

 
Picture of Howard Miller
Mightily confused by file storage
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers

I was trying to find backup files in the database in order to get an estimate of how much space they take up. So.... why does this return an empty set...

select filepath,filename from mdl_files where filename like '%.mbz';

 
Average of ratings: -
Dan at desk in Moodle HQ, Perth
Re: Mightily confused by file storage
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I'm not sure..

moodle=# select filepath,filename from mdl_files where filename like '%.mbz';
 filepath |                        filename                         
----------+---------------------------------------------------------
 /        | backup-moodle2-course-4-features_demo-20121114-1513.mbz
 /        | backup-moodle2-course-2-dan-course-1-20130118-1050.mbz
(2 rows)

Other ways you could use to find them:

moodle=# select filepath, filename from mdl_files where component = 'backup' AND filename != '.';
 filepath |                        filename                         
----------+---------------------------------------------------------
 /        | backup-moodle2-course-4-features_demo-20121114-1513.mbz
 /        | backup-moodle2-course-2-dan-course-1-20130118-1050.mbz
(2 rows)
moodle=# select filepath, filename from mdl_files where mimetype = 'application/vnd.moodle.backup';
 filepath |                        filename                         
----------+---------------------------------------------------------
 /        | backup-moodle2-course-4-features_demo-20121114-1513.mbz
 /        | backup-moodle2-course-2-dan-course-1-20130118-1050.mbz
(2 rows)
 
Average of ratings:Useful (1)
Picture of Howard Miller
Re: Mightily confused by file storage
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers

Ok, thanks Dan. I'm doing something stupid then. The files are definitely there (i.e. when I click 'restore' in a course). I'm off to look harder smile

 
Average of ratings: -