Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-15457 Moodle 3.11 QA
  3. MDLQA-16030

CLONE - An admin can use a CLI script to restore a course from backup

XMLWordPrintable

      This test requires

      • Server access to be able to run command line interface (CLI) scripts
      • Several Moodle course backup files, especially large backups including user data

      1. Open the console and run the command: php admin/cli/restore_backup.php
      2. Verify that the output looks like:

      Restore backup into provided category. Options:
      -f, --file=STRING Path to the backup file.
      -c, --categoryid=INT ID of the category to restore too.
      -s, --showdebugging Show developer level debugging information
      -h, --help Print out this help.Example:
      $sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1

      3. Run the command with path to a file that doesn't exist.

      4. Verify that the output states that the requested file could not be found.

      5. Run the command with path to the backup file correctly set and the category id set to 1:

      6. Verify that the output states that the course is restored.

      7. Log in to the Moodle site and verify that the course is restored into the correct category and  activities and resources are correctly restored. 

      8. If the backup file contained user data, verify that the user data is also correctly restored.

      9. Repeat steps 5 - 8 with more backup files and different category ids.

        1. manage_course.png
          103 kB
          Sujith Haridasan
        2. restore_large_backupfile.gif
          220 kB
          Sujith Haridasan
        3. UI-restore-error.png
          39 kB
          Ravi Murugesan

            ravim Ravi Murugesan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.