MoodleCloud storage

Re: MoodleCloud storage

by Cameron 👨‍🦲🟥⚡️ -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Testers

Hi Yvonne,

Since you have FTP access I've written a small PHP script to query the DB for you:

<?php

require_once('config.php');
global $DB;

$bytes = $DB->get_field_sql("
            SELECT SUM(f.filesize)
              FROM (
                    SELECT DISTINCT
                                    contenthash,
                                    filesize
                               FROM {files}
                              WHERE filearea <> 'draft' AND
                                     referencefileid IS NULL AND
                                     component <> 'tool_recyclebin' AND
                                     (component <> 'backup' OR mimetype <> 'application/vnd.moodle.backup') AND
                                     component <> 'assignfeedback_editpdf' AND
                                     component <> 'core_h5p' AND
                                     component <> 'contentbank'
                                     UNION SELECT contenthash, filesize from {files} WHERE (component = 'core_h5p' AND filearea = 'content' AND filesize > 0)
                           GROUP BY filesize, contenthash
              ) AS f");

$index = floor(log($bytes, 1024));
echo round($bytes/1024**$index, 2) . ' ' . ['B', 'KB', 'MB', 'GB'][$index];

Save that in a file called "size.php" and upload it to the root of your moodle installation. Then browse to http://yourselfhostedmoodle.com/size.php

It should tell you how "big" MoodleCloud considers your site.

Cheers,

Cam

Average of ratings: Useful (1)