[3.7] Extract course backup files from moodledata

Re: [3.7] Extract course backup files from moodledata

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

contenthash is really the location of the file.

select contenthash,filearea,filename,filesize from `mdl_files` where filename like "%.mbz%" order by filesize DESC

is meta data and will return rows like:

496b7ed2c090160c8d955887f7834c244e8e492b     course     backup-moodle2-course-593-dim-20200522-1149.mbz     30168358282

The contenthash: 496b7ed2c090160c8d955887f7834c244e8e492b

is the location of the file in moodledata/filedir/ and filename ... no humanly recognizable filenames in /moodledata/filedir/

moodledata/filedir/49/6b/496b7ed2c090160c8d955887f7834c244e8e492b

From command line on Linux one could use file -b on that file to see it's mimetype.

'SoS', Ken

Average of ratings: Useful (2)