Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39617

CLI backup script for backing up a single course

    Details

    • Testing Instructions:
      Hide
      1. Find a course you want to backup, note its ID (e.g. 2) and SHORTNAME (e.g. mdlcourse)
      2. Run
        sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2
      3. Click on Restore in the interface, check that in the course backup area new file has been listed.
      4. Run
        sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/some/dir
      5. Check that the backup file has been created at /some/dir directory.
      6. Run
        sudo -u www-data /usr/bin/php admin/cli/backup.php --courseshortname=mdlcourse
      7. Click on Restore in the interface, check that in the course backup area new file has been listed.
      Show
      Find a course you want to backup, note its ID (e.g. 2) and SHORTNAME (e.g. mdlcourse) Run sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 Click on Restore in the interface, check that in the course backup area new file has been listed. Run sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/some/dir Check that the backup file has been created at /some/dir directory. Run sudo -u www-data /usr/bin/php admin/cli/backup.php --courseshortname=mdlcourse Click on Restore in the interface, check that in the course backup area new file has been listed.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-39617-master

      Description

      Could be quite useful, especially if you want to backup a huge course and does not want to load the frontend.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14