link to the file / moodledata data growing too much

link to the file / moodledata data growing too much

by Amir Mohammadi -
Number of replies: 4

Hi. Thank you for every great support till now.

Do you have any idea about this? We use template courses. We add all activity and all resources to this template course using link to the file. After that we make a copy of this course and enroll the students. We are using repository in moodle to link our contents (movies,books and ...) to course. But when we make a copy of course size of new course show that every link resources completely copied with original volume. For example when i create an activity file in moodle and link a 500Mb movie from repository to it; if i delete this movie this file will loose and i can not use it anymore because the file linked to a deleted file.  But when i copy this course, if i delete that movie i will access to it information in copied course and it isn't linked to original file. It made a duplicate from original file. In fact it made a copy of this activity not link it to repository. so when we make 3 copy of this course 1500Mb will add to moodledata. And moodledata growing too much. What i can i do?



Average of ratings: -
In reply to Amir Mohammadi

Re: link to the file / moodledata data growing too much

by Amir Mohammadi -
I should also mention that all of this happens on the internal server and we have repository inside moodledata directory
the os is centos 7
lsphp 7.3
In reply to Amir Mohammadi

Re: link to the file / moodledata data growing too much

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You mean, you keep big files in a https://docs.moodle.org/en/File_system_repository and link from there? Are you sure, your people _link_ them? The default behaviour is to _copy_.
In reply to Visvanath Ratnaweera

Re: link to the file / moodledata data growing too much

by Amir Mohammadi -
Hi think we found the answer. We are uploading scorm files in repository. When we are trying to link scorm file to a scorm activity the moodle automatically unzip the file and keep it in filedir. So its size will be doubled. Is it true? Sometimes we upload scorm but Strangely, that file is corrupted and we must upload it again.
But i have another question that is very weird:
4 days ago our moodle data being 7 GB from 64GB
Our supported team see all of filedir move to local cache and after a minute all of it removed. I really can not understand what happened? Is it any bug or error? or it is a penetration to our server? no history command show commands that did this.
In reply to Amir Mohammadi

Re: link to the file / moodledata data growing too much

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
So the "big files" I was talking about in my previous post were SCORM files? I don't use SCORM, they are media files bundled in HTML/JS, I understand. Yes, then your theory sounds feasible. The bundled (zipped) file will remain in the file system repository. The unbundled files land in moodledata/filedir, roughly doubling the total space used.

But if you pull a SCORM (from the file system repository) a the second time, Moodle should "store" them in the same places in moodledata/filedir as the first time. So the total won't increase. That is, it will remain double, not triple - at least in theory. Ask the moderators to move this discussion to the SCORM forum, the specialists are there.

No, never heard of Moodle backing up the whole filedir in localcache. Definitely not in minutes. We encounter filedirs of hundreds of GB in size!