Moodledata folder purpose

Moodledata folder purpose

by Ripa Desai -
Number of replies: 3

Hello,

I am trying to copy my production environment through 2TB external drive. However, the space occupied by moodledata folder is 399Gigs. It is very difficult to copy. Do you have any easiest and fastest way to copy moodledata folder. So I can build my test environment. Right now I am copying our moodledata folder on NAS server. But it's very time consuming. Do you have any alternative for not to copy moodledata folder? I also would like to know purpose behind to keep moodledata folder and filedir folder (which occupies almost 399Gigs disk space) of moodledata folder.



Thanks


Average of ratings: -
In reply to Ripa Desai

Re: Moodledata folder purpose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Make sure cron has been running on your site. If not, nothing will ever have been deleted. 

The only directory you *need* is moodledata/filedir. All other directories are not required and will be recreated automatically.

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Moodledata folder purpose

by Ripa Desai -

Hello,


Thanks for your promptness. What does mean "nothing will ever have been deleted"? What needs to be deleted? What is increasing inside filedir folder?


How do I check cron jobs is running or not,?


Thanks

In reply to Ripa Desai

Re: Moodledata folder purpose

by Ken Task -
Picture of Particularly helpful Moodlers

+ 1 to what Howard has already said/suggested.

moodledata/filedir contains all the files uploaded to moodle ... teacher uploads as well as student uploads.    It is very important to back it up.   Files contained therein are not 'humanly recognizable' and it's wise to backup the database for Moodle as it contains the meta data that eventually become humanly recognizable links/files.

If you are asking those sorts of questiona about cron, might be that it's not setup.  Important that it be setup cause one of the task/jobs of cron is to automagically 'empty' the trashdir which contains files no longer linked anywhere in the moodle site.

Please see: https://docs.moodle.org/33/en/Cron

Been my experience (depending upon factors), that rsync'ing moodledata/filedir/ contents is minimal backup and all that is needed, as Howard has already said.   rynsc would bascially mirror what's in moodledata/filedir/.  Initial run of rsync would take some time, but if one sets up incremental rsync after that, only new files added to moodledata/filedir/ get copied to the location of the rsync'd directory backup and any files that have been removed from filedir are also removed from the rsync'd directory backup.   The incremental rsyncs go much faster.

For details on rsync, if on Linux 'man rsync' should provide what you need or do Google search for your platform and rsync.

'spirit of sharing', Ken

Average of ratings: Useful (1)