How to import and export courses in Open edX?
Open edX allows course administrators to import and export courses for backup, migration, and sharing across platforms. Below is a step-by-step guide to managing course imports and exports.
1. Exporting a Course in Open edX
Exporting a course creates a .tar.gz
archive containing all course content, settings, and structure.
Steps to Export a Course
- Log in to Open edX Studio.
- Open the course you want to export.
- Navigate to “Tools” β “Export Course” (top-right corner).
- The system generates a
.tar.gz
file. - Click “Download Exported Course” to save it to your local computer.
πΉ Whatβs Included in the Export?
β
Course structure (sections, subsections, units)
β
Videos, text, and quizzes
β
Grading settings and discussions
β Learner data (not included in the export)
2. Importing a Course in Open edX
You can import an exported course to another Open edX instance or restore a backup.
Steps to Import a Course
- Log in to Open edX Studio.
- Create a new course (or open an existing course).
- Navigate to “Tools” β “Import Course” (top-right corner).
- Click “Choose a file” and upload the
.tar.gz
course file. - Click “Upload and Replace” to start the import.
- The system will process the course and display a success message.
πΉ What Happens During Import?
β
Replaces existing course content (if applicable)
β
Restores the course structure and assets
β Does NOT overwrite student enrollment or progress
3. Migrating Courses Between Open edX Platforms
If youβre moving courses between different Open edX versions, follow these steps:
- Export the course from the older platform.
- Check for compatibility issues (e.g., outdated XBlocks).
- Import into the new Open edX instance.
- Test the course to ensure all components work properly.
4. Bulk Importing Multiple Courses
If you need to import multiple courses:
- Place all
.tar.gz
course files in a designated import directory on the server. - Use the Open edX management command:
python manage.py cms import /path/to/courses/
- The system will process and add all courses.
5. Exporting and Importing Course Data via API
For automated backups and migrations, you can use Open edX APIs.
Export Course via API
curl -X GET "https://your-openedx-instance/api/courses/v1/export/course-v1:edX+DemoX+2023" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Import Course via API
curl -X POST "https://your-openedx-instance/api/courses/v1/import/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "course_file=@course.tar.gz"
Conclusion
By using manual exports, bulk imports, and API automation, Open edX allows easy course backup, migration, and sharing across platforms. π