50 Commits

Author SHA1 Message Date
Marina Glancy
44e86fb3d5 MDL-34859 backup: add restore defaults 2017-03-20 14:59:45 +08:00
Marina Glancy
92253b15b7 MDL-40838 backup: restore enrolment methods without users 2017-02-20 12:08:35 +08:00
Eloy Lafuente (stronk7)
53f95c99cb MDL-54205 backup: loggers close() and destroy()
Any backup & restore operation may be leaving opened files
if a file logger is being used. This implementes the close()
method, so every logger can close any resource.

Also, the recommended backup_controlled::destroy() method
now calls to new logger::destroy() method in charge of
deleting all the references and closing any resource.

Finally, some internally used controllers, were missing
their destroy call, leading to associated loggers to
remain open. Now all them are explicitly deltroyed.
2016-05-13 01:54:28 +02:00
Tony Levi
303936aa57 MDL-50453 core: Replace reserved word usage in progress\null (PHP7) 2015-06-15 12:21:27 +09:30
sam marshall
ddf368a213 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:31:34 +00:00
James Pratt
809fdb83b1 MDL-41754 (1) Progress tracking : moved from backup and restore to core 2014-01-27 17:45:50 +07:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Damyon Wiese
5d5c4c0b73 MDL-43411 Backup: Fix restore from 1.9
The restore progress bars introduced a bug when restoring Moodle 1.9 backups.
build_plan needs to be surrounded with start_progress/end_progress with the mode
set to indeterminite or it throws coding errors.
2013-10-17 15:54:24 +08:00
sam marshall
bf2a039e9a MDL-42039 Restore: Add progress tracking in restore controller load
In the case of a very large backup with many activities, simply loading
the restore controller (specifically, building the plan) can take a long
time and cause timeouts. This change adds progress reporting while the
restore controller is being loaded.

(This also reduces the time between first going to the page, and the
progress bar appearing, making a slightly better user experience.)

Conflicts:

	backup/restore.php
2013-10-10 10:57:24 +08:00
sam marshall
77b3d9dfdf MDL-38196 Backup/restore: Display log if non-empty
When doing a backup or restore operation with the normal user interface,
if there is anything in the backup/restore log, it will now be displayed
at the end of the process below the Continue button.

If you have developer debugging enabled, it sets the display level to
LOG_DEBUG and there will always be content in the log. Otherwise, it
uses LOG_INFO which generally means the log is empty, and nothing
displays (no visible change for users).
2013-10-08 11:00:11 +01:00
Dan Poltawski
0df3254212 Merge branch 'MDL-41254-m' of git://github.com/micaherne/moodle 2013-09-09 18:04:05 +08:00
Michael Aherne
91dbb24442 MDL-41254 backup Raise time and memory limit in precheck. 2013-09-02 10:22:40 +01:00
sam marshall
16cd708835 MDL-38190 (1) Backup/restore: Progress tracking API 2013-08-16 10:50:35 +01:00
Petr Škoda
8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Andrew Nicols
b1850c12c1 MDL-37761 Backup: Do not include files in backups when importing courses/activities
When we import courses or duplicate activities, the deduplicating nature of
the file_storage system means that we don't actually have to include the
real files in the backup - just their metadata from the file table.

The restoration process needs to know not to expect files from the backup
phase so a flag is set in moodle_backup metadata.
2013-06-18 07:52:04 +01:00
Eloy Lafuente (stronk7)
93f9755c74 MDL-29262 phpunit: fix forgotten mock objects to avoid strict notices 2012-04-23 15:01:14 +02:00
Dan Poltawski
e0ed91ba39 Merge branch 'MDL-29262' of git://github.com/stronk7/moodle
Conflicts:
	version.php
2012-04-23 12:42:16 +08:00
Eloy Lafuente (stronk7)
749fd68cbb MDL-29262 restore: Clean controller obj form DB once finished ok 2012-04-23 00:14:32 +02:00
Eloy Lafuente (stronk7)
6e803b9fe4 MDL-29262 backup: Clean controller obj form DB once finished ok 2012-04-23 00:03:37 +02:00
Petr Skoda
bb7898c6ab MDL-32569 convert remaining backup tests and drop old simpletests 2012-04-21 16:24:33 +02:00
Petr Skoda
4b02743182 MDL-32149 improve testcase naming and list in config file 2012-04-03 22:30:57 +02:00
Petr Skoda
1cbf2a20ca MDL-32149 setUp() and tearDown() are supposed to be 'protected', add missing blog testcase 2012-04-03 22:30:56 +02:00
Petr Skoda
dbf5a44798 MDL-32149 add backup tests and dropping of extra tables 2012-04-03 22:30:54 +02:00
Eloy Lafuente (stronk7)
184acafab6 MDL-28180 backup - set excluded activities for any non-course operation 2011-12-12 00:30:58 +01:00
Sam Hemelryk
f8adfe6cc0 Merge branch 'w36_MDL-28701_m22_tempcachedir' of git://github.com/skodak/moodle 2011-09-12 18:26:09 +12:00
Eloy Lafuente (stronk7)
59fc0cbdb7 MDL-28488 backup - conditionaly apply defaults based on mode
Some modes of backup cannot be preloaded with general backup
settings because they may conflict with the definitions required/set
by the mode (for example, import backups are, by definition, without
users always, so we cannot apply one default in the opposite direction).

So, after the patch, current general_backup setting will be only applied
to general backups, import/hub modes won't be using any default and
automated backup defaults should be loaded here (TODO)
2011-09-11 19:35:56 +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
Eloy Lafuente (stronk7)
b7a45fa782 MDL-24684 backup - basic protection against time/memory limits 2011-06-30 03:37:30 +02:00
David Mudrak
fe50f530fd MDL-27379 Backup conversion logging facilities 2011-06-06 13:56:06 +02:00
David Mudrak
1e2c735111 MDL-27376 MDL-27377 MDL-27378 Backup converters refactoring - work in progress
These are David's changes of Mark's code that replace the
plan/tasks/steps infrastructure with a bit simpler one. The changes will
be described in the next commit that will actually finish the
conversion.

TODO: refactor backup/converter/moodle1/stepslib.php into conversion
handlers.
2011-05-10 17:58:00 +02:00
David Mudrak
0164592b8c MDL-27376 MDL-27377 Backup converters API refactored
* Several base_converter methods made protected when there was no obvious
reason why they should be public (subject of eventual change still).
* The conversion chain now constructed in advance before any converter
class is instantiated, using Dijkstra's algorithm.
2011-05-10 17:57:59 +02:00
Mark Nielsen
c5c8b3503a Making the conversion process more re-usable 2011-05-10 17:57:51 +02:00
Mark Nielsen
1e8c265c2b Added converter format detection and added conversion logic to restore controller 2011-05-10 17:57:50 +02:00
Eloy Lafuente
8231bb159b MDL-24962 backup - clean plan/settings circular refs on restore 2010-11-15 16:08:02 +00:00
Eloy Lafuente
ab1c069e11 MDL-24962 backup - circular refs. cleaner in backup_controller 2010-11-15 07:16:51 +00: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
Eloy Lafuente
fe575d8215 NOBUG: Added note to avoid forgetting it 2010-11-01 15:52:18 +00:00
Sam Hemelryk
b50bea4a1b backup MDL-22184 Updating a couple of PHP docs 2010-10-21 04:02:55 +00:00
Sam Hemelryk
3acc9b81f5 restore MDL-23109 Added role mapping interface and implemented searchable course/category selectors 2010-07-27 06:58:39 +00:00
Sam Hemelryk
785d6603dd backup MDL-23109 Implemented base restore UI within Moodle and linked through the navigation. 2010-07-22 07:48:02 +00:00
Eloy Lafuente
8d4e41f4ec MDL-21432 backup - role load/mappings and integration with UI via controller (MDL-23109) 2010-07-20 22:51:04 +00:00
Eloy Lafuente
c3ea499d53 MDL-21432 backup - handle mnet_remoteusers and support for prechecks 2010-07-18 23:49:55 +00:00
Eloy Lafuente
482aac657a MDL-21432 backup - root task, inforef and users handling completed, various fixes 2010-07-14 23:59:19 +00:00
Eloy Lafuente
754a102b13 MDL-21432 backup - restore controller 2010-07-06 22:25:54 +00:00
Eloy Lafuente
f60f4666f9 MDL-21432 backup - added operation to separate backup & restore 2010-07-05 16:37:50 +00:00
Sam Hemelryk
61ebef8f6e backup MDL-22140 Added conf settings to control the default general backup settings 2010-06-17 08:57:00 +00:00
Sam Hemelryk
f6ae3f0108 backup MDL-22142 P18 - Removed unused ui related function and params from core backup classes 2010-05-02 03:31:56 +00:00
Eloy Lafuente
2de3539b43 MDL-21432 backup - clean temps after execution 2010-04-29 18:30:17 +00:00
Eloy Lafuente
ce937f9957 MDL-22145 backup storage - provide 'user_tohub' storage for HUB files 2010-04-27 01:02:38 +00:00
Eloy Lafuente
c6cc972695 MDL-21432 backup 2.0 - initial commit. controller 2010-04-21 09:26:06 +00:00