Are these backup files and can I remove them?

Are these backup files and can I remove them?

by Debbie Unterseher -
Number of replies: 3

Do you think all of these files are backups and we can delete them?  Searched for file > 1 GB.  What if we search for files > 300 mb.  Could we assume they were all just backups to delete as well if their filename was strange like those listed below?  Looking for an easy way to delete old backups.

/moodledata/filedir/fb/0b/fb0bb7a6b831e63822673ccccd30cfd04d66f674
/moodledata/filedir/18/a2/18a2017a4d2017ab57b51e80434b9c981c62cd43
/moodledata/filedir/52/56/52562d948cfdfa7e77b281bedac01beda1c60ee8
/moodledata/filedir/16/ff/16ff9cc48321b55fcc6d8fe444be292a5a325d53
/moodledata/filedir/af/4f/af4f5629fe7e63346b422b69eaa42bffc7e9d581
/moodledata/filedir/af/de/afde4210a36caf05b32b71efaa5f1f7f727cb099
/moodledata/filedir/0e/b7/0eb7cc38b721fa8d220dc36ee04e56d693538e82
/moodledata/filedir/0f/c3/0fc3cec0d52e58bcea2e6d493dbcc0359db53d46
/moodledata/filedir/00/28/0028411476c362d571a15a92443ce1c99317bd57
/moodledata/filedir/38/58/385804b6355de762e5cb767a99a9a8d45f20aa2e
/moodledata/filedir/3b/a0/3ba027a4eb969d3c38d6fe7c7b36a0a40edb09d1
/moodledata/filedir/60/a9/60a95401fc5daa41203eefee82a6cfe442fed7f2
/moodledata/filedir/5b/1f/5b1f1a553e41cf75d46214be41e0ae96ee5adbb6
/moodledata/filedir/43/6a/436ac60d60d6818ad5681022a9f58be2e3ba1536
/moodledata/filedir/4f/8a/4f8ad08ba7e8b2ab6b386cf82d0c4735b5ac333f
/moodledata/filedir/19/6a/196ae438ab48f19a412a3a05beda8e1a5eaf9122
/moodledata/filedir/e5/76/e576cec3cd71c6f68a5e30a58c27c2e501288d3e
/moodledata/filedir/75/20/7520662c4359a786beb3c62bc81ef83d8d049323
/moodledata/filedir/a4/58/a458413a69be5cefd9262b9d4e371b3768d1e1f5
/moodledata/filedir/67/cb/67cb5ce0bc3eecec114156a629c7932aa03a128e
/moodledata/filedir/c0/0f/c00fcb646b5ab7be00e334829eb2540ac4431858
/moodledata/filedir/95/9f/959f695707055173927796f031df861eda8772c3
/moodledata/filedir/f6/be/f6be129a4b8f609a674a067065506bf4e92d2b51
/moodledata/filedir/2a/62/2a62027e2977e4a5405ecb2ac976b53801a04b99
/moodledata/filedir/25/66/2566737a8a2c229e035c0c647ebddceda790f999
/moodledata/filedir/4c/b3/4cb3e2eef72f1e44351cfb267be6ed17c36b0454
/moodledata/filedir/17/e3/17e31c5402118ab8cb152bea4299b4c928fee11f
/moodledata/filedir/17/2a/172a2abdd29529d07937851c44aa9135356a909f
/moodledata/filedir/8f/33/8f33bd85e6db1d521c69ca36a4858e90b07bd012
/moodledata/filedir/9a/9e/9a9ea8da69669f496016c27f18bf94c77559a7b4
/moodledata/filedir/4e/a9/4ea9bdf7c2ae52ffc711c7735aa41b274556a891
/moodledata/filedir/0a/e6/0ae690c2a2c5dff08c6ae3f9607ab318d45e95d0
/moodledata/filedir/cc/61/cc61f176e0953e3a9ea6dd4a010d1bf320de42b9
/moodledata/filedir/cc/ee/ccee11e09cee31c775c4ceab5b65ff8dd2ff4908
/moodledata/filedir/44/cd/44cd8ffbbfc3973adb9e9b4bec4409f6414ea4b6
/moodledata/filedir/f8/cd/f8cde5f77ce04df577d1aff485b064d7e35d8807
/moodledata/filedir/13/20/13202590137e811426c814fd814ba521813f3f27
/moodledata/filedir/bf/f3/bff33c35849f22f19980e52d5ac85ae32b89deaf
/moodledata/filedir/34/b4/34b4123c2ab990656d9cb640c63faf2b19021ad5
/moodledata/filedir/34/2a/342af3e97895c6ba6f07cb6a04602bd9c9a0ab73
/moodledata/filedir/a9/c9/a9c9631f0b89f885684554a848c4c6ead3baaeb6
/moodledata/filedir/e0/71/e07134ce2376a8b950a4ff2d574ff637019f22f8
/moodledata/filedir/9c/8b/9c8ba78a5739d1c6794853df94da7e9722a5d507
/moodledata/filedir/03/4c/034cd3b83b45566b619cef11b310e91c91dab556
/moodledata/filedir/cd/34/cd34fe1e3de7c3c91327aacc686319880deffd5c

Average of ratings: -
In reply to Debbie Unterseher

Re: Automated Backups not Listed in Course Restore Window

by Ken Task -
Picture of Particularly helpful Moodlers

@Debbie ...

You've posted in a discussion thread that took place in 2013.

While your question might seem related, it's probably best to start your own thread stating your problem ... this one is about backups not listed in course restore Window.

'Are these backup files and can I remove them?' might be a good topic line in your posting.

Might also include basic information about server ... like Moodle version, etc..   As well as other (might be related) info .... like we run autobackups, we had run autobackups, etc., etc.

'spirit of sharing', Ken


In reply to Ken Task

Re: Are these backup files and can I remove them?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

No need to start a new thread Debbie, as I've split your post and renamed it as suggested by Ken.

In reply to Debbie Unterseher

Re: Are these backup files and can I remove them?

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks, Helen ...

@Debbie ...

From what you've shared so far ... think you are using Linux ...  some of the following is for Linux.

Moodle versions prior to 2.6.x still used .zip as backups.
At that version there was an option to turn on experimental compression using gzip. Backup files retained their .mbz extension.

Size could be an indication they are backups, but they could also be videos or other file types.

file -b /moodledata/path/to/file

If that command responds with:
gzip compressed data, from Unix

They are, more than likely, backups (.mbz's)

If that command responds with:
Zip archive data, at least v2.0 to extract

It is a zip file and might be a link created by a teacher in their course
for resource files.

To double sheck do a query on the DB for your Moodle on mdl_files table.

select contenthash,filename,filesize,filearea from `mdl_files` where (`filearea` like "backup" and `filename` like "%.mbz%");

Or

select contenthash,filename,filesize,filearea from `mdl_files`;

(latter will, on a large site with lots of file resources, take some time and probably should be used in non-prime time depending)

If you remove the file from /moodledata/filedir/ (and the subdirectory
structure IF it contains a single backup file, **ALSO** remove the record
for it in mdl_files table.   It is not recommended to ever mess with files in moodledata/filedir/ as the only humanly recognizable file in that directory (warning.txt) states:

"This directory contains the content of uploaded files and is controlled by Moodle code. Do not manually move, change or rename any of the files and subdirectories here."


There is a plugin that might help:
https://moodle.org/plugins/report_filetrash
shows compat from moodle 2.5 to 2.9

Are you running cron/task jobs often enough?

'spirit of sharing', Ken