Export/Import Course from DEV > PROD

Export/Import Course from DEV > PROD

by Brian Maynes -
Number of replies: 7

I have slogged through many of the posts regarding the import/export course feature of Moodle, but for the life of me I'm not grasping the process of exporting a single course from one Moodle server and importing the course into another server of the same Moodle version.

We create and test all new courses on a test server first and then wish to import this course into the production server. I am able to export the course from the dev/test box and I can see the course .zip file in the \backupdata folder under the course # folder in \moodledata, but what do I need to do in order to get the course unzipped and imported into production?

Any clarification you can provide is much appreciated.

Brian

Average of ratings: Useful (1)
In reply to Brian Maynes

Re: Export/Import Course from DEV > PROD

by roger keller -
Hi Brian

Got exactly the same task to do as you have. Have backup of courses and want to import them on another moodle server (instead of your situation it's a newer version than the backup was taken from...finger crossed...)

Did you find a solution to your problem/question?

greets
In reply to Brian Maynes

Re: Export/Import Course from DEV > PROD

by Dean Thayer -
This may not be the best procedure possible, but here's what I do:

  1. If this is my first course transfer, I create a new course called Transfers in a new category called Admin (these names are just my convention).
  2. Backup the empty Transfers course. This creates a backup directory in the Moodle data folder (moodledata by default).
  3. Take note of the id for the Transfers course (found in the URL when viewing the course). Let's call this newid from now on.
  4. Backup the course I want to transfer on the other site. Just do a course backup as you normally would.
  5. Take note of the id for the course you want to transfer (see the URL). I'll call this oldid from now on.
  6. Copy the backup file from oldserver:/path to/moodledata/oldid/backupdata to newserver:/path/to/moodledata/newid/backupdata by whatever means you have available (FTP, SFTP, NFS, CIFS, scp, cp).
  7. Visit the Files section of your Transfers course and you will see the backup of the old course.
  8. Restore it to a new course like you normally would when cloning a course on a single site.
Average of ratings: Useful (1)
In reply to Dean Thayer

Re: Export/Import Course from DEV > PROD

by Dean Thayer -
Some Moodle docs indicated that you may need to edit the backup file before restoring.
Average of ratings: Useful (1)
In reply to Dean Thayer

Re: Export/Import Course from DEV > PROD

by .. .. -
To export it, simply got to the folder called backupdate, open it, and right click on the zip file. Save target as to your desktop. Then go through the normal import steps, importing the zip from yuor desktop. Easy as pie.
In reply to .. ..

Re: Export/Import Course from DEV > PROD

by Denise Lewis -

I followed your instructions and thought I was almost there... until I got an error saying "A required parameter (id) was missing". any ideas?

In reply to Denise Lewis

Re: Export/Import Course from DEV > PROD

by ben reynolds -

Hi Denise,

That's the typical message when your file upload is larger than the limit on your Moodle or classroom. Search Moodle.org on that phrase for how to fix.

In reply to Dean Thayer

Re: Export/Import Course from DEV > PROD

by Jason Robertson -

Thanks for posting this. It definitely got me on the right track!