Commit Graph

196 Commits

Author SHA1 Message Date
Andrew Hancox 820f28c61b MDL-61578 backup: Added unit test for is_course_modified check. 2018-07-10 10:50:30 +08:00
Michael Hawkins 4b9c2928d4 MDL-61578 backup: Prevent backup logging triggering fresh backups.
Thanks to Renaat Debleu for their contribution to this solution.
2018-07-10 10:50:30 +08: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
Shamim Rezaie 8df402e401 MDL-61132 Questions: Adapt logic on backup/restore
Modifying backup/restore to adapt with "Top" categories.
2018-02-05 11:58:57 +11:00
Ankit Agarwal 23876070b9 MDL-59908 backup: Add tests to make sure both http(s) schemes are parsed 2017-08-24 10:33:24 +05:30
Mark Nelson f1dd575c6f MDL-59737 core_backup: changed reference to domain doesntexist.com 2017-08-07 17:17:58 +08:00
Dmitrii Metelkin 597c6f2a09 MDL-58811 backup: fix an extra slash on restore for the legacy files 2017-05-16 14:35:16 +10:00
Eric Merrill 880fc15bf0 MDL-47162 core_message: Updating all uses of messaging to add courseid 2016-10-31 14:13:13 -04:00
Amanda Doughty cc350fd9c8 MDL-47162 core_message: Add course id to message eventdata 2016-10-27 18:11:27 +02:00
Daniel Neis Araujo fbcdb0d710 MDL-22078 course: add end date 2016-10-03 09:51:36 +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
Simey Lameze 11d4bea28b MDL-50268 core: proper deprecation of get_file_url() method 2016-01-18 13:44:22 +08:00
Russell Smith eb8c0cb163 MDL-52402 backup: Improve debugging output on failed log restores 2015-12-05 10:08:06 +11:00
Eloy Lafuente (stronk7) 8827b67aeb MDL-52141 backup: test restore_log_rule don't modify passed log anymore 2015-12-03 18:52:26 +01:00
Russell Smith a8137ec25f MDL-52141 backup: Ensure we don't alter the log record when parsing it. 2015-12-03 11:11:07 +01:00
Jean-Philippe Gaudreau e10c9acc19 MDL-50602 - Automated backup: Add constants for storage types
Improve the code readability significantly by adding constants for storage types.
2015-09-24 14:08:18 -04:00
Jean-Philippe Gaudreau 2b7c85da17 MDL-50602 - Automated backup: Remove old backups associated to courses
Refactoring and renaming of settings.
2015-09-24 14:08:17 -04:00
Serge Gauthier 694f195da0 MDL-50602 - Automated backup: Remove old backups associated to courses 2015-09-24 14:02:19 -04:00
Dan Poltawski 77679fb2e5 Merge branch 'MDL-36957-master' of git://github.com/FMCorz/moodle 2015-06-02 11:07:57 +01:00
Martin Mastny 4ee052641e MDL-49493 backup: Implemented missing methods for anonymous backup 2015-05-25 10:35:11 +08:00
Dan Poltawski 9b67b43b21 Merge branch 'MDL-49755' of git://github.com/mr-russ/moodle 2015-04-14 17:45:56 +01:00
Petr Skoda e49cb057a1 MDL-49828 timezones: fix typos introduced by MDL-49684 2015-04-12 12:11:10 +12:00
Frederic Massart 725d18f980 MDL-36957 backup: Allow invalid setting level in backup info file 2015-04-09 17:33:52 +08:00
Petr Skoda d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Russell Smith 9129827158 MDL-49755 backup: Cache backup information. 2015-04-05 20:03:08 +10:00
David Monllao 59aebbed70 MDL-48595 logstore: Replacing references to deprecated interfaces 2015-03-09 08:25:37 +08:00
Eloy Lafuente (stronk7) 16dafa5d9f Merge branch 'MDL-48266-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2015-01-26 19:19:35 +01:00
Frederic Massart 94b8c63635 MDL-48266 backup: Fix backup strorage misconfiguration
Basically if the destination dir is empty then the storage
type should be set to the course backup area. This does
not affect the behaviour of the backups that lived with
misconfigured settings.
2015-01-22 17:49:26 +08:00
Ray Bon 914cad8793 MDL-48837 phpunit: Restore system default timezone 2015-01-16 12:46:26 +08:00
Ankit Agarwal bd58dfbfa1 MDL-48556 backup: Use correct conditions before checking dir permissions 2014-12-10 14:33:05 +05:30
Sam Hemelryk eb8f9f9adb Merge branch 'MDL-42717-master' of git://github.com/ankitagarwal/moodle 2014-12-01 08:47:34 +13:00
Dan Poltawski 8030d84bbc Merge branch 'MDL-47601_master' of https://github.com/markn86/moodle 2014-11-24 17:02:09 +00:00
Ankit Agarwal 80a1dfe561 MDL-42717 backups: set correct backup status and add logs
Set a correct backup status of ERROR when we fail to copy a file to an external directory given the backup configs demand it.
Also a lot of logs are added around this area to let admins easily find the problem if backup fails because of directory permissions.
2014-11-24 10:18:56 +05:30
David Monllao 03c39daad8 MDL-31500 backup: Allow front page backup/restore
Removes restore on front page restrictions and allows
front page modules duplication.
2014-11-21 14:55:09 +08:00
Mark Nelson 425dc0ed96 MDL-47601 core_backup: ensure removal of automated backups 2014-11-16 23:56:59 -08:00
sam marshall 94b084fb02 MDL-48179 Backup progress: Can time out when compressing large backup 2014-11-14 18:29:30 +00:00
Mark Nelson c3359103cd MDL-34248 core_backup: added missing end quotation 2014-07-14 23:48:33 -07:00
Frederic Massart 073be367e2 MDL-40228 backup: Settings were ignored during automated backups 2014-06-20 15:37:32 +08:00
Tim Hunt 5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Ankit Agarwal 2523979821 MDL-42890 backup: Remove usage of log table in backup cron helper 2014-03-14 12:07:17 +08:00
James Pratt 809fdb83b1 MDL-41754 (1) Progress tracking : moved from backup and restore to core 2014-01-27 17:45:50 +07:00
Tim Hunt 3d1c4e189e MDL-43448 Links to the gradebook not fixed on restore.
Note we can only fix certain generic links, we can't handle ones like
/grade/report/{reportname}/index.php, but fortunately, we were only
using the generic ones.

I added a couple of other likely things too (badges and participants
list).
2013-12-20 11:55:01 +00: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
Ankit Agarwal 932f54e996 MDL-42489 backup: use correct exception class in automated backups 2013-10-28 09:58:56 +08:00
Ankit Agarwal f3218d15b0 MDL-42427 backup: Fix undefined errors during automated backups 2013-10-23 12:03:13 +08:00
Mark Nelson 70f210c04f MDL-42201 backup: introduced new automatic backup state 2013-10-21 11:51:12 +08:00
Ankit Agarwal b2e791d153 MDL-37877 backup: Fix issues with zipping of large files
Files bigger than 4GB is not supported at this point. Zip archiver doesn't know about it and always returns true. We need to verify if it is a valid file or not and delete if not
Also delete the backup file immediately if anything goes wrong anywhere in backup. We don't want to use up space
2013-10-15 12:14:23 +08:00
Eloy Lafuente (stronk7) b1636b4a8b Merge branch 'MDL-37181_master' of https://github.com/markn86/moodle 2013-10-13 23:32:30 +02:00
Damyon Wiese 4aac948f34 MDL-41838 Backup: Fix undefined variable
Nice spotting Ankit!
2013-10-10 12:11:18 +08:00
sam marshall 1cd39657b5 MDL-42039 Restore: Add progress reporting to directory deletion
Deleting directories at the end of backup can take a long time if
there are many directories (potentially up to 65536 file
directories). This change reports progress while deleting
directories to avoid timeout.
2013-10-10 10:56:30 +08:00