MDL-35773 Backup: API should have option to not backup files
authorMatt Porritt <mattp@catalyst-au.net>
Mon, 10 Dec 2018 01:27:26 +0000 (12:27 +1100)
committerMark Nelson <mdjnelson@gmail.com>
Fri, 26 Jul 2019 03:59:56 +0000 (11:59 +0800)
commitd7e4481e9875ff79e74b90e79d23c726f730e178
tree1470c1eef34d8135d120407921d67256c9a6bd31
parentf622ee97e346568cd1f664d961937db8251ef74d
MDL-35773 Backup: API should have option to not backup files

Allow both UI and automated backups to be created without
including files.  Instead include only file references.
This is essentially implementing "SAMESITE" to backup files
instead of only for import and export functionality.
A new backup setting to include files (defaults to yes)
has been included.

The restore process will also look for and attempt to
restore files from the trashdir as part of restoring
backups.  Additionally to support this process the
ammount of time files are kept in trashdir before they
are cleaned up via cron is also adjustable via admin
setting.
17 files changed:
admin/settings/courses.php
admin/settings/server.php
backup/backup.php
backup/controller/backup_controller.class.php
backup/moodle2/backup_root_task.class.php
backup/util/dbops/backup_plan_dbops.class.php
backup/util/dbops/restore_dbops.class.php
backup/util/helper/backup_cron_helper.class.php
backup/util/helper/backup_helper.class.php
backup/util/ui/backup_ui_stage.class.php
backup/util/ui/renderer.php
lang/en/admin.php
lang/en/backup.php
lib/filestorage/file_storage.php
lib/filestorage/file_system.php
lib/filestorage/file_system_filedir.php
version.php