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)