Mightily confused by file storage

Mightily confused by file storage

by Howard Miller -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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: -
In reply to Howard Miller

Re: Mightily confused by file storage

by Dan Poltawski -

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)
In reply to Dan Poltawski

Re: Mightily confused by file storage

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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