Moodle
  1. Moodle
  2. MDL-21432 META: Backup & restore 2.0
  3. MDL-22153

post: clean old backup/restore files once they aren't necessary anymore

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.5
    • Component/s: Backup
    • Testing Instructions:
      Hide

      A) Verify that the 3 deleted files (backuplib.php, lib.php and restorelib.php) and the deleted dir (bb) aren't any more present under /backup.

      B) Perform the following operations and verify nothing fails about (lib|backuplib|restorelib) stuff:

      • Backup a course.
      • Restore a course.
      • Import contents from a course from another.
      • Duplicate an activity.
      • Enable automated backups (admin->courses->backup->automated", setting it to manual and perform an execution of admin/cli/automated_backups.php with web server credentials).
      • Verify that the "backup" admin report works without error. And show the results of the last execution. It doesn't matter if the status of any course is failed or unfinished or if that date is January 1970. Unrelated to this issue.
      • Create a book activity and export it using the "Generate IMS CP" option (activity administration block). It should lead to the generation & download of a .zip file containing an imsmanifest.xml file. Open it with any editor and verify it looks ok and does not contain any PHP error.
      Show
      A) Verify that the 3 deleted files (backuplib.php, lib.php and restorelib.php) and the deleted dir (bb) aren't any more present under /backup. B) Perform the following operations and verify nothing fails about (lib|backuplib|restorelib) stuff: Backup a course. Restore a course. Import contents from a course from another. Duplicate an activity. Enable automated backups (admin->courses->backup->automated", setting it to manual and perform an execution of admin/cli/automated_backups.php with web server credentials). Verify that the "backup" admin report works without error. And show the results of the last execution. It doesn't matter if the status of any course is failed or unfinished or if that date is January 1970. Unrelated to this issue. Create a book activity and export it using the "Generate IMS CP" option (activity administration block). It should lead to the generation & download of a .zip file containing an imsmanifest.xml file. Open it with any editor and verify it looks ok and does not contain any PHP error.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      249

      Description

      All the old backup/restore libs, old /backup directory....

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Deleted all the *html files, mainly to help Helen looking for usused strings.

          Show
          Eloy Lafuente (stronk7) added a comment - Deleted all the *html files, mainly to help Helen looking for usused strings.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          All the activities/blocks/questions backup & restore files deleted.

          Only a few remain under /backup containing some unimplemented bits (events, blogs...)

          Show
          Eloy Lafuente (stronk7) added a comment - All the activities/blocks/questions backup & restore files deleted. Only a few remain under /backup containing some unimplemented bits (events, blogs...)
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          Just about to delete both backuplib, lib.php and restorelib files. We kept them there since 2.0 only to have in a persistent way the missing bits in Moodle 2.x backup (blogs, messages, (some events) & gradebook history.

          But we can look to them easily when/if those tasks are (ignited).

          So, simply, deleting them.

          Show
          Eloy Lafuente (stronk7) added a comment - - edited Just about to delete both backuplib, lib.php and restorelib files. We kept them there since 2.0 only to have in a persistent way the missing bits in Moodle 2.x backup (blogs, messages, (some events) & gradebook history. But we can look to them easily when/if those tasks are (ignited). So, simply, deleting them.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I've verified, one by one, all the functions in the 3 files and they are not used in codebase at all (only some inter-uses between the files was found). So it seems that it's 100% safe to delete all them.

          Show
          Eloy Lafuente (stronk7) added a comment - I've verified, one by one, all the functions in the 3 files and they are not used in codebase at all (only some inter-uses between the files was found). So it seems that it's 100% safe to delete all them.
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          Sending to integration 2.5 only. it includes:

          • The deletion of the 3 files and the backup/bb dir.
          • Added note in backup/upgrade.txt.
          • Added some of the deleted files to the upgrade_stale_php_files_present() function.
          • Deleted 2 unused includes of the deleted stuff (admin/report/backup & mod/book/tool/exportimscp).

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - - edited Sending to integration 2.5 only. it includes: The deletion of the 3 files and the backup/bb dir. Added note in backup/upgrade.txt. Added some of the deleted files to the upgrade_stale_php_files_present() function. Deleted 2 unused includes of the deleted stuff (admin/report/backup & mod/book/tool/exportimscp). Ciao
          Hide
          Dan Poltawski added a comment -

          Integrated to master - thanks Eloy

          Show
          Dan Poltawski added a comment - Integrated to master - thanks Eloy
          Hide
          Rossiani Wijaya added a comment -

          This is working as expected.

          Tested for master.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This is working as expected. Tested for master. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Your awesome contributions are now part of Moodle, your fav LMS out there.

          Closing this as fixed.

          Many thanks for all the hard work, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Your awesome contributions are now part of Moodle, your fav LMS out there. Closing this as fixed. Many thanks for all the hard work, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: