Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Backup 2.0: Difference between revisions

From MoodleDocs
No edit summary
 
(27 intermediate revisions by 10 users not shown)
Line 1: Line 1:
=== Drop in ideas ===
{{Template:WillNotMigrate}}{{Template:Backup 2.0}}{{Moodle_2.0}}__NOTOC__{{Work in progress}}
== Summary & Objectives ==
The backup & restore functionality has been present since Moodle 1.1 (29 August 2003, more than six years ago!) and, although it has been continuously improved and renewed, the core has remained basically the same.


* Support incremental backups & restore.
Many things have evolved since then both in Moodle and PHP-land so this project is an attempt to rework the backup & restore functionality in order to achieve these goals:
* Support 1-activity backup.
 
* Support anonymisation of personal data on backup.
* '''Modernise''' the code base, using actual PHP/DB techniques: OOP, exceptions, temporary DB tables, transactions... aiming to reduce the current ''"spaghetti code"'' in various places.
* Separate process and progress.
* '''Unify''' current developments, so all backup alternatives (manual, export, silent, scheduled...) will be executed by the same code base (also for restore/import of course).
* XML format doesn't need to be radical different (IMO).
* '''Improve''' the process, making it more reliable, being able to pre-detect wrong situations, rollback (if possible) to previous states, and apply any possible benefit both for speed (some interim in-memory caches) and memory (better parsing techniques).
* Support restore of old (1.9 only?) backups.
* Improve '''Security''', so the Moodle permissions structure will be 100% respected and any user data disclosure will be avoided, of course, whilst giving the admins the flexibility to change default behaviours by configuring them in a standard way.
* Hook in backup & restore to intercept & support other formats (BB, IMS-CC...)
* '''New features''' requested from the Community will be added. Things like fine grained control of various restore parts, the ability to backup not only course structures, but sections or individual activities, anonymised backups and so on will début with Moodle 2.0. See the [[Backup 2.0 requirements|requirements]] section for more info.
* One code base both for manual and scheduled backup
 
* Scheduled restore
== Implementation plan ==
* Fileless export/import
 
* Export/import over mnet
META bug in the Tracker: MDL-21432
* OOP.
* Secure (don't handle non-allowed data, user matching on restore, salted passwords..)
* Safe (some sort of "rollback" on failure - requires to have everything annotated somewhere - backup_ids or so).
* file-less backups - if you have separate backups, import/export etc.
* Allow to backup one category of courses (at the same time, one zip per course). MDL-17187
* Allow to mark courses to be excluded from scheduled backup manually.
* Avoid anti-timeout output when not running from browser. MDL-17282

Latest revision as of 19:02, 3 May 2022


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.

Moodle 2.0

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Summary & Objectives

The backup & restore functionality has been present since Moodle 1.1 (29 August 2003, more than six years ago!) and, although it has been continuously improved and renewed, the core has remained basically the same.

Many things have evolved since then both in Moodle and PHP-land so this project is an attempt to rework the backup & restore functionality in order to achieve these goals:

  • Modernise the code base, using actual PHP/DB techniques: OOP, exceptions, temporary DB tables, transactions... aiming to reduce the current "spaghetti code" in various places.
  • Unify current developments, so all backup alternatives (manual, export, silent, scheduled...) will be executed by the same code base (also for restore/import of course).
  • Improve the process, making it more reliable, being able to pre-detect wrong situations, rollback (if possible) to previous states, and apply any possible benefit both for speed (some interim in-memory caches) and memory (better parsing techniques).
  • Improve Security, so the Moodle permissions structure will be 100% respected and any user data disclosure will be avoided, of course, whilst giving the admins the flexibility to change default behaviours by configuring them in a standard way.
  • New features requested from the Community will be added. Things like fine grained control of various restore parts, the ability to backup not only course structures, but sections or individual activities, anonymised backups and so on will début with Moodle 2.0. See the requirements section for more info.

Implementation plan

META bug in the Tracker: MDL-21432