Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
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
sam marshall
e555a4439f MDL-41722 Backup: Very large course times out on user interface pages
Adds 'Preparing page display' progress bars for user interface pages
if they take a long time to display.

Also adds changes where other parts of the backup progress timed out on
long backups. After this change, and MDL-41838, it is finally possible on
my dev server to successfully back up the 'XL' test course.
2013-10-04 10:32:13 +01:00
Petr Škoda
eb459f7192 MDL-40642 set more restrictive umask and use proper permission for new dirs and files 2013-07-19 09:18:44 +02: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
096702f698 MDL-30725 save automated external only backups directly to ext storage, do not pollute file pool
This solution is based on code by Tony Levi, thanks!
2012-06-07 10:49:48 +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
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
Petr Skoda
4756e9c9e2 MDL-21915 fixing remaining chmod and mkdir to use moodle file permissions 2010-10-06 19:06:52 +00:00
Eloy Lafuente
dc1e4ccebd MDL-23752 backup - export/import mode. Fixed various details. 2010-09-28 09:33:54 +00:00
Eloy Lafuente
767cb7f03a MDL-22151 & MDL-22138 - Quiz activity backup & questions banks too!
CV S: ----------------------------------------------------------------------
2010-09-21 01:28:30 +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
c0bd624928 MDL-21432 backup - Small change in API after discussion in MDL-22245 2010-07-07 22:56:14 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
Eloy Lafuente
cf10078dba MDL-22142 - quick hack until P26 gets fixed 2010-05-03 10:00:19 +00:00
Eloy Lafuente
1386bc0905 MDL-22145 backup storage - anonymised courses go to user_backup file area too 2010-05-02 09:21:05 +00:00
Eloy Lafuente
9eeaea5fa4 NOBUG backup - on OS temp area, use backup.zip. When storing, rename to utf-8 name 2010-05-02 00:19:51 +00:00
Sam Hemelryk
2589eb89f0 backup MDL-22251 fixed issue with delete_old_backup_dirs passing a full path rather than a backupid 2010-04-30 03:02:36 +00:00
Eloy Lafuente
2de3539b43 MDL-21432 backup - clean temps after execution 2010-04-29 18:30:17 +00:00
Eloy Lafuente
cd0034d860 MDL-22145 backup - implemented storage into proper file areas 2010-04-27 21:42:54 +00:00
Eloy Lafuente
633fedbcea MDL-22145 backup storage - add missing userid 2010-04-27 01:10:15 +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
69dd0c8cbf MDL-21432 backup 2.0 - initial commit. util dir 2010-04-21 09:17:06 +00:00