17 Commits

Author SHA1 Message Date
Matt Porritt
2cd901a4e7 MDL-28505 Backup: Asynchronous backup and restore
This patch adds asynchronous backup and restore functionality
to Moodle. This is an optional feature and is not enabled by
default. It can be enabled by site administrators.
Asynchronous backup and restores are actioned by the Moodle
adhoc task API. The progress of backup and restores is
displayedin the Moodle UI.  Users can also be sent a message
when a backup or restore operation completes via the
Moodle messaging API.
2019-04-09 00:15:42 +00:00
Matteo Scaramuccia
ef844148a9 MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.

Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
2018-04-16 23:50:28 +02:00
Jake Dallimore
f2faf9fae6 MDL-35429 restore: capability clarification for automated backups
- added relevant cap check on restorefile.php to improve the error
message when attempting to restore automated backups. This cap is
already responsible for controlling restores from automated areas.
- Restored the 'viewautomatedfilearea' capabilities original lang
string.
2017-10-09 10:29:07 +08:00
Tim Hunt
70e85280f4 MDL-56136 restore: better error handling copying file at start 2016-09-27 18:07:50 +01:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Sam Hemelryk
39bd07f732 MDL-43526 course: links to restore from management and admin structure. 2014-01-07 12:08:34 +08:00
sam marshall
a658b73cd0 MDL-42039 Restore: Avoid unnecessary archive file copy at start
Change the start of restore process so that the archive file can
be passed as a pathnamehash pointing to the Moodle file object,
rather than only as a filename in the temporary directory. This
avoids making an unnecessary copy of the archive file, which can
take a long time (and potentially cause a timeout) in the case
of multi-gigabyte backups.
2013-10-10 10:56:30 +08:00
Adrian Greeve
a689cd1def MDL-34469 - lib - replacement of the deprecated get_context_instance and get_context_by_id functions (group 15) 2012-07-30 14:59:57 +08:00
Petr Skoda
aff24313be MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
2011-09-25 09:59:55 +02:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02:00
Petr Skoda
431ac39634 MDL-26623 fix file permissions
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Sam Hemelryk
bac233d326 backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
 MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
 MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
 MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
 MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
 MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
 MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
 CPY [schedule,core],[automatedbackupschedule,core_backup]
 MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
Dongsheng Cai
d0da42d1b7 MDL-24917, display activity backup area in restore-pre ui 2010-11-02 02:29:21 +00:00
Dongsheng Cai
0e4c5b912c MDL-24303, check tmp dir before copying backup files 2010-09-21 09:58:03 +00:00
Dongsheng Cai
6aef525df4 "MDL-23910, improved restore pre-ui, removed treeview, list backup files in tables and sorted by created time" 2010-08-26 06:19:46 +00:00
Dongsheng Cai
30ad8cddc5 MDL-22915, added user backup to tree, added capability check to file picker form 2010-07-28 05:38:23 +00:00
Dongsheng Cai
72f38ce751 MDL-22915, restore pre-ui 2010-07-22 03:14:41 +00:00