Hello,
currently one our Moodle (2.9.1) is using very much disk space,
i.e. the filedir in the data directory of a particular Moodle instance
is extreme big.
When i look up the 10 biggest files the in the db I get:
mysql> SELECT contenthash, contextid, filearea, filepath, filename, filesize, FROM_UNIXTIME(timemodified) FROM mdl_files ORDER BY filesize DESC LIMIT 10;
+------------------------------------------+-----------+-----------+----------+----------------------------------------------------------------------+------------+-----------------------------+
| contenthash | contextid | filearea | filepath | filename | filesize | FROM_UNIXTIME(timemodified) |
+------------------------------------------+-----------+-----------+----------+----------------------------------------------------------------------+------------+-----------------------------+
| 6a3207dd96e38ffefe6fe9882422a95c9f200700 | 2 | automated | / | backup-moodle2-course-1-xxx-20160206-0650.mbz | 3455842512 | 2016-02-05 23:53:57 |
| 17fb53057b5de5c32e24f1271658d336458c5e90 | 2 | automated | / | backup-moodle2-course-1-xxx-20160208-0650.mbz | 3455842328 | 2016-02-07 23:54:05 |
| a6ec40a21f321c03414c12138dc1f3f58448b1fc | 2 | automated | / | backup-moodle2-course-1-xxx-20160209-0650.mbz | 3455842306 | 2016-02-08 23:53:58 |
| ec8c70b4a4043913ad82fad2ef71faaf41dced60 | 2 | automated | / | backup-moodle2-course-1-xxx-20160207-0650.mbz | 3455842273 | 2016-02-06 23:54:01 |
| e9a28d8cd1ea5a8129d22d83f6c1a08c5e9178c8 | 263 | automated | / |backup-moodle2-course-12-yyyt-02-20160208-0658.mbz | 1003993663 | 2016-02-07 23:59:24 |
| 5a62ff0fc7b4cf78d1fc2be616181f116c8fa8b0 | 263 | automated | / | backup-moodle2-course-12-yyy-02-20160209-0657.mbz | 1003993581 | 2016-02-08 23:59:17 |
| 9b4e88c15c673d1b7fa2187bcb38ff8e380c4a76 | 263 | automated | / | backup-moodle2-course-12-yyy-02-20160206-0657.mbz | 1003993512 | 2016-02-05 23:59:17 |
| 64ac1afaf365875b379dd2f0c88e0f522519ab94 | 263 | automated | / | backup-moodle2-course-12-yyy-02-20160207-0657.mbz | 1003993425 | 2016-02-06 23:59:16 |
| cea6b05ae6a8831e718f9eba42082539e45ff9d3 | 2996 | automated | / | backup-moodle2-course-72-zzz-02-20160208-0713.mbz | 987337314 | 2016-02-08 00:14:39 |
| 144ed5a6bcae3a1335ce08b6596b74893128d999 | 2996 | automated | / | backup-moodle2-course-72-zzz-02-20160209-0713.mbz | 987337062 | 2016-02-09 00:14:40 |
+------------------------------------------+-----------+-----------+----------+----------------------------------------------------------------------+------------+-----------------------------+
10 rows in set (0.01 sec)
mysql>
We make course backups. The corresponding .mbz. files are in a separate backup folder apart from the data folder.
The backup file "backup-moodle2-course-1-xxx-20160206-0650.mbz“ which referenced in the db (see above) of course
is nowhere to be found. That kind of "referenced backup files“ only occur in February.
I just want to delete them. Of course I’m hesitant to delete the hash-files in the filedir.
Can you help me here with info how to delete them? Is there a tool to clean it ?
Thanks for your answers!
Best,
Sonja