What can be excluded from remote backup of moodledata (dataroot) folder?

What can be excluded from remote backup of moodledata (dataroot) folder?

by David M -
Number of replies: 1

When taking remote backups of site data (eg, using rsync), for the moodledata folder (dataroot) which of its contents can be excluded from the remote backup?

There are several folders in moodledata whose names suggest that they only contain transient data and so it would not be necessary to take a backup of them:

  • cache
  • localcache
  • lock
  • sessions
  • temp
  • trashdir
Is it safe to exclude any or all of these from a remote backup, on the assumption that Moodle would rebuild them when the server is restored or rebuilt?


(using Moodle 3.9, at the time of writing this post)

Average of ratings: -
In reply to David M

Re: What can be excluded from remote backup of moodledata (dataroot) folder?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The *only* directory you can't do without is filedir. You can skip the rest.
Average of ratings: Useful (1)