Can I move moodledata to a different location?

Can I move moodledata to a different location?

by José Francisco Sala García -
Number of replies: 7

Hi Visvanath Ratnaweera,

I had to remove my LMS Moodle from my website because of the big size of moodledata directory, because my students submitted pictures and videos with their homework plus my own videos (Some students liked to know if I knew when they watched my videos.).

I wonder if I can put moodledata directory in other server, like dropbox or a NAS drive.

Thanks in advance,

José Sala

Average of ratings: -
In reply to José Francisco Sala García

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes you can (not so much Dropbox). You have to be careful about performance issues - especially caching. It's well enough documented.
In reply to Howard Miller

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by José Francisco Sala García -

I have found this link from Ken Task https://moodle.org/mod/forum/discuss.php?d=335243#p1351415: «Where the space is eaten up is filedir and trashdir (the latter if not running cron/task often enough).». If Dropbox couldn't be used I could try with a NAS driver.

Thanks.

In reply to José Francisco Sala García

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Ken Task -
Picture of Particularly helpful Moodlers

Since someone rattled my tree! ...

The other discussion may not apply to all setups ... keeping some moodledata on web server and some directories that needed to be fast ... like cache/sessions, etc.  ... and using remote storage for filedir ... where moodle stores backups/user uploaded files/content.  Kinda depends upon where/how hosted and what one can do in overall environment/virtualization.

Any remote storage involves networking ... if network hickups and filedir is a mount point to a directory on something providing that remote storage, moodle kinda crippled.

Example of hosting ... Rackspace offers storage devices (concept like a remote drive) ... OP choose size and has to set up the mount ... like /mnt/data/.   That can be attached or de-tached ... moved to another server within the same data center.

Filedir could be in /mnt/data/filedir ... of course, if there is any hickup in the data center .... there's issues with moodle ... can login cause sessions is in moodledata on web server, but bascially cannot do anything involving files that are stored in /mnt/data/filedir/

That muddy the waters any? :|

'SoS', Ken

Average of ratings: Useful (1)
In reply to José Francisco Sala García

Re: Can I put moodledata directory in other server, like dropbox or a NAS drive?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

A little understanding will explain this seemingly complex issue. For a Moodle installation the code directory and the data directory are what they are, just directories (attached to the same computer).

Of course using all kinds of file system technologies a directory (or a storage volume) in a different computer could be "mounted" to the Moodle server in such a way that the server sees this as a part of its own file system. This is commonly known as a network drive. So, if the system knows how to attach (mount) DropBox or NAS or whatever to the Moodle server and can handle file system permissions for Moodle web server, it'll work. On theory, unfortunately. Moodle is pretty sensitive about its data directory. So, you might have luck or no luck. (See Howard's reply. For more details visit the Hardware and performance forum.)

It is always the trade-off between cheap infrastructure costs and expensive system administration costs.

BTW, it carrying somebody else's discussion https://moodle.org/mod/forum/discuss.php?d=406058#p1639048 in a different direction, in to one's own topic, is not appreciated. I gave this new topic a new subject line. I sent a note to the moderator to split this.
In reply to Visvanath Ratnaweera

Re: Can I put moodledata directory in other server, like dropbox or a NAS drive?

by José Francisco Sala García -
Thanks for your piece of advice. Next time I will start my own topic in my own thread. Sorry for that.
In reply to José Francisco Sala García

Re: Can I put moodledata directory in other server, like dropbox or a NAS drive?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Forget the side topic. The moderator will look after it.

It is impossible to give the same advice to an end user and a system administrator. In case you want to tackle it, note that the Moodle data directory is not one thing. filedir/ is the main thing, but there are all sorts of caches, temp. directories, language packs, sessions, ... Some need to be fast, some very fast. And others which could be slow. Read the comments in config-dist.php and go through the documentation in Hardware and performance forum and various past discussions.
In reply to José Francisco Sala García

Re: Can I move moodledata to a different location?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Split and moving to Hardware and performance...