Should Cache Files Be Backed Up?

Should Cache Files Be Backed Up?

by Natassia Stelmaszek -
Number of replies: 3

I have to believe that this has been covered somewhere but I haven't been able to find it in my searches.  When doing a system backup the documentation seems to recommend backing up the "moodledata" directory.  That directory contains cache files and session files that seem to change regularly (frequently) and on our system they take a huge amount of time/space to back up. 

Is it necessary to keep these files backed up or are they just things that will be created as needed when the site is in use?

Example: moodledata/cache/casestore_file/default_application/core_htmlpurifier/ (subdirectories numbered from 001 through FFF!)


Thanks

Tasha

Average of ratings: -
In reply to Natassia Stelmaszek

Re: Should Cache Files Be Backed Up?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There are two sorts of cache files:

One, small set of files stores the cache configuration in the folder called 'muc'. You want to back those up.

But you don't need to store all the cached data, stored in a folder called 'cache'. It can be re-constructed from the data in the Moodle database.

You can also skip backing up 'localcache', 'temp' and 'trashdir'.

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Should Cache Files Be Backed Up?

by Natassia Stelmaszek -

Thank you, that'll save me a lot of time!

Tasha