Why the forum migration from MongoDB to MySQL comes before the upgrade
If your self-hosted Open edX site still keeps discussion data in MongoDB, the forum move to MySQL is a prerequisite step that must finish before a forum v2 release can be installed. It has its own data checks, and its effort depends on discussion volume, any customizations to the forum data or code, and the target release. Treat it as a separate work item in the plan, not as a footnote to the upgrade.
Open edX states that the latest named release is the only supported release and that it cannot support more than one release at a time. That makes the forum move part of the upgrade plan rather than a standalone project. The current named release is Open edX Verawood, published on 30 July 2026, and the next releases, Willow and Xylon, are listed for December 2026 and June 2027. Confirm with your partner or internal team which release you are targeting, because the migration commands and the forum version you install depend on that choice.
Before scheduling the work, confirm the current state of your discussion data: which MongoDB databases hold forum content, how many threads, posts and comments exist, and whether any custom forum settings or code read from MongoDB directly. Ask for a dry run on a copy of production, a reconciliation of record counts between the two stores, and a rollback plan that keeps the MongoDB data intact until learners and course teams have confirmed the migrated discussions. The Open edX release notes are the right starting point for confirming which release and forum version your upgrade path requires.
What maps cleanly from MongoDB forum storage to MySQL
This table compares each forum record type in the legacy MongoDB backend with how it is expected to land in MySQL. Use the migration notes for planning, then check the version column against the release notes for your target forum release. The main takeaway is that nested replies, moderation state and user references need explicit verification on your own data before cutover.
| Forum data | Migration note | Version dependence | Confirm before migrating |
|---|---|---|---|
| Threads | Top-level discussion records carry over with their course and unit identifiers. Confirm course keys survive unchanged. | Field names and identifier formats can change between forum releases. | Thread fields and key format in the target release notes. |
| Comments and replies | Nested responses are embedded in MongoDB but stored as related rows in MySQL, so parent links need checking. | Nesting depth and parent references depend on the forum version. | How parent-child nesting is represented and whether full depth is preserved. |
| Votes | Vote data may migrate as per-user records or as aggregate counts. Plan a count check either way. | Vote storage has changed across forum versions. | Whether individual vote records migrate or only totals. |
| Subscriptions | Follow relationships link users to threads, courses or other discussion scopes. Verify each scope type after import. | Supported subscription scopes vary by release. | Which subscription types the migration command covers. |
| Moderation flags | Abuse reports, pinned posts and closed threads are state fields to verify individually after migration. | Moderation fields are among the most version-sensitive parts of the data. | Whether flags, pinned and closed states migrate, and where they are stored. |
| User references | Authors, editors and moderators are stored as user identifiers that must match the MySQL user records. | Identifier formats depend on the platform release. | How user IDs are matched and how orphaned references are handled. |
| Timestamps and edit history | Created and updated times should carry over, but edit history may not be stored in the same form. | Edit history support varies by release. | Whether edit history migrates or only the current content. |
| Attachments and rich content | Post bodies and embedded links migrate as text. Uploaded files depend on where storage is configured. | Storage backend settings change between releases. | Where uploaded files are kept and whether they need a separate step. |
Documented forum migration commands and export paths to use
The forum migration is a short sequence of documented commands, but the work around them decides whether the move is safe to repeat. The cards below cover the backup, the target database, environment configuration and verification, plus the rule to follow the forum documentation for the exact command sequence in your release.
Confirm the documented command sequence
Take the command names, flags and order from the forum documentation for your target release, not from blog posts, forum threads or scripts copied from another site. Record the exact release and commit used for the run so the steps can be repeated during a rehearsal and audited later. Ask your implementation partner to show which documented steps they ran and in what order.
Open edX release notesBack up MongoDB before the run
Take a full MongoDB backup of the forum database before any migration command runs, and store it outside the host that will be changed. Test that the backup restores into a scratch instance, because an unrestorable backup offers no rollback. Keep the backup until the MySQL data has been verified and the platform has run normally for a period your operations team agrees on in advance.
Prepare the MySQL 8.0 target
Provision a MySQL 8.0 target that matches the version Open edX development requires, with character set, storage and privileges set before the import starts. Size storage for the migrated discussion data plus room for indexes and the rollback window, and confirm the schema the forum service expects with the documentation for your release. Avoid creating tables by hand, since the documented commands are expected to build the target structure.
Set environment configuration in Tutor
Carry the forum database settings and service connections through Tutor configuration and plugins rather than editing running containers. Keep the MongoDB and MySQL connection values in the environment definition that the team versions, so a rebuilt staging or production stack gets the same settings. Check the forum service configuration after each Tutor change and confirm which values your Tutor version reads.
Tutor docsVerify counts and thread integrity
Compare record counts for threads, comments and users between MongoDB and MySQL before and after the run, and spot-check threads that contain edits, attachments and nested replies. Run read-only verification queries and keep their output with the change record. Sign-off should rest on these checks plus a learner-facing test of posting, replying and search in a course, not on the command exit status alone.
Avoid undocumented scripts and direct edits
Do not run ad hoc scripts found online or edit forum tables directly in MySQL or MongoDB, even to fix a single thread. Direct edits bypass the application logic, can break references between threads and comments, and are hard to reverse or explain to an auditor. If the documented steps fail, stop, restore from backup and open a support request with the release, logs and command output.
Sequence for the forum migration from MongoDB to MySQL
This sequence moves Open edX discussion data from the legacy MongoDB forum backend to MySQL in a controlled order, so each stage produces evidence the client can approve before the next one starts. It ends with MongoDB removed only after the rollback point has expired.
Inventory forum data and customizations
DeployOpen and the client's platform owner list the forum data in the MongoDB backend, including threads, comments, subscriptions and any custom forum code, templates or plugins that read or write those collections. We also confirm the Open edX release and forum version in use, because the migration requirement depends on whether the target forum release has dropped MongoDB. The step closes with a written inventory and a list of customizations that need retesting, which the client signs off before any backup work begins.
Take and test backups
We take a full MongoDB backup of the forum database and the MySQL target's current state, then restore the MongoDB backup into an isolated environment to prove it is readable. The restore is checked against record counts from the inventory. The step is complete when a restore has succeeded and the client has accepted the backup as the rollback source, with its location and retention recorded.
Run the migration on a staging copy
We run the documented forum migration commands against a staging copy of production data, using the same Open edX release, forum version and configuration as production. Any errors, skipped records or manual fixes are logged so the production run has no surprises. The step closes when the staging run completes cleanly and the client approves the logged results as the basis for a production rehearsal.
Verify counts and sample threads
We compare record counts for threads, comments and users between MongoDB and MySQL, then open a sample of threads across courses, including long threads, threads with attachments, and threads with edits or deleted posts. Each sampled thread is checked for content, authorship, timestamps and tags against the source. The step is done when counts match or each difference has a documented explanation and the client agrees the sample represents their content.
Run a parallel read-only comparison
With the platform still pointed at MongoDB, we run a read-only comparison that reads the same discussion data from both backends and reports differences in what learners and course teams would see. This exercises the custom code identified in the inventory as well as the stock forum views. The step is complete when the differences are either fixed or accepted in writing by the client, and no open defect blocks the cutover.
Schedule the cutover window
We agree a cutover window with the client, confirm who approves the go or no-go decision, and set the freeze on forum writes during the migration. The rollback plan is written down with the steps to point the platform back at MongoDB and the owner who can trigger it. The step closes with a signed cutover plan and a tested communication to course teams and learners about the window.
Switch the forum backend
During the agreed window, we freeze forum writes, run the final migration against production, switch the forum configuration to MySQL, and restart the affected services. We then run smoke tests covering posting, replies, search, notifications and moderation tools. The step is done when smoke tests pass and the client confirms learners and course teams can use discussions normally.
Decommission MongoDB after the rollback point
MongoDB stays available as a rollback source until the client's agreed rollback point has expired without a rollback request. Only then do we remove the forum database, revoke its credentials, update backup jobs and monitoring, and archive the final MongoDB backup under the client's retention policy. The step closes with a decommission record listing what was removed, where the archive lives and who approved the removal.
Verification gates every step from staging to decommission
The forum data starts in the legacy MongoDB store, where a backup and inventory are taken before anything moves. The documented forum migration commands load a staging copy in MySQL, and verification compares thread and post counts and checks sample threads against the source. A mismatch sends the team to remediation and back to staging, not forward. Only a verified copy goes through a parallel run and cutover, before the forum v2 upgrade. MongoDB is decommissioned last.
Phases for moving forum data, with a verification gate that can send work back to remediation.
What drives the cost and duration of the forum move
This table lists the factors that change the effort of moving discussion data from MongoDB to MySQL, and whether each one is paid once or recurs. Use it to see which answers in your environment will move a quote up or down, and what to put in the written scope before work starts.
| Driver | Why it changes effort | What to ask for in a quote |
|---|---|---|
| Discussion volume and attachments | More threads, replies and uploaded files mean longer export, transform and import runs, and more data to check afterward. | Counts of threads, comments and attachments per environment, and whether attachment storage is handled in scope. |
| Courses and course runs with active discussions | Each run with live discussions adds mapping work for course IDs and more records to reconcile. | A list of course runs with active discussions and which ones are archived or excluded. |
| Custom forum code or moderation tooling | Local changes to the forum service or moderation scripts may need rework against the MySQL backend and the new release. | A code review of local forum changes and a line item for each custom tool that reads forum data. |
| Number of environments | Staging, production and any multi-node deployments each need a rehearsed run, plus a shared cache configuration for multi-node setups. | Whether the quote covers staging rehearsals, production cutover and repeat runs, and who owns each environment. |
| Depth of verification required by your review | Internal audit or compliance reviewers may ask for record counts, sampling, access checks and retained evidence of the migration. | The verification steps, the evidence format, and whether a retest after cutover is included. |
| Timing of the target upgrade | A move tied to a fixed upgrade date leaves less room for rehearsal and rollback, and may need work outside normal hours. | The target release, the planned dates for rehearsal and cutover, and who approves the change window. |
| Ongoing support after cutover | Post-migration fixes, backup changes and monitoring of the new MySQL data are recurring work, not part of the one-time move. | Whether support is a separate retainer, its response expectations, and the end date of the warranty period. |
How the move differs by deployment model
On a single Tutor-managed server, MongoDB, MySQL, Memcached and the forum service run on the same host. That keeps the data stores close together, so the main risk is an inconsistent copy taken while learners are still posting. The change window is mostly about pausing discussion writes, taking a consistent backup, running the migration and checking threads before service resumes.
- Backups: Confirm the backup covers the Docker volumes that hold the MongoDB and MySQL data, along with the Tutor project configuration.
- Database access: Access is local through the Tutor command-line tooling, so no database port needs to be opened to another host.
- Network paths: Internal traffic stays on the container network. The public proxy and DNS do not change during the forum move.
- Cutover timing: The window is set by how long writes take to stop, the migration run and the verification of sample threads and replies.
Confirm the Tutor version on the server, the installed plugins, and whether an offline copy of the pre-migration data exists before anyone runs the migration.
A Tutor deployment on Kubernetes with external MySQL, MongoDB and Redis splits the forum service from its data. The migration job has to reach both databases across a network path that the platform team controls, and the database owner may hold the backup schedule. Cutover then coordinates several workloads and the shared cache, not one host.
- Backups: Ask the database owner for a backup taken immediately before the window and a tested restore procedure for both MongoDB and MySQL.
- Database access: The job needs credentials for both databases, usually held as Kubernetes secrets. Confirm who owns those secrets and how they are rotated.
- Network paths: Network policies, service endpoints and firewall rules must allow traffic from the job to both databases. Test that path before the window.
- Cutover timing: Pause forum writes and scale the relevant workloads in a defined order. Multi-node deployments need a shared Django cache backend such as Redis or Memcached, so keep that tier running and consistent throughout.
Confirm which team owns each external store, the namespace and job runner, and who approves each scale-down and scale-up step.
A legacy native install being replaced by Tutor starts from a different state. MongoDB and MySQL may have been configured by hand, custom settings may live in older configuration files, and forum code may differ from what a Tutor image provides. The data move itself is the same, but the team must first document what the source looks like and what the target will run.
- Backups: Older installs often rely on scheduled dump scripts. Check that they are complete and restore one on a separate host before relying on them.
- Database access: Credentials may sit in legacy configuration files. Record them, then confirm the MongoDB and MySQL versions on the source against what the target expects.
- Network paths: The legacy host and the new Tutor host may both be reachable during the move. Decide which one serves learners at each stage and control DNS accordingly.
- Cutover timing: Include any theme or custom XBlock work that affects discussions in the window, and keep the legacy host available for rollback until verification passes.
Confirm the source versions, any custom forum changes, and the person who signs off the cutover away from the legacy host.
What goes wrong in a forum migration from MongoDB to MySQL
Forum data moves between two stores that do not share a schema, and the platform keeps running while it moves. The risks below share one cause: the team treats the move as a data copy rather than a change to how the whole platform finds and writes discussion data. Each card names a check to complete before the cutover window opens.
Discussion data dropped or mis-linked
Posts, comments and threads can fail to import, or import with author links that no longer point to the right learner account. Discussion content is easy to miscount because a missing thread looks like an empty course. Before cutover, compare thread, comment and reply counts per course between the source and the target, and sample threads from several courses and check that authors resolve to the expected users.
Missing or untested backup
A forum migration rewrites the discussion store, so a backup that was never restored is not a backup. Take a full MongoDB dump and a MySQL snapshot before the run, then restore both into a staging copy and confirm the forum loads and returns threads. Record which backup set is the rollback source so nobody has to find it during an incident.
Cutover before the upgrade is ready
Forum v2 releases that dropped MongoDB expect MySQL to hold the discussion data before the new code runs. If the data moves while the old forum code is still live, or the upgrade lands before the data is verified, learners see errors or stale threads. Confirm the release sequence in the upgrade plan, and agree who signs off that the forum service is on the correct version before the window opens.
MongoDB still referenced after the move
Settings, Tutor configuration, plugins and custom code can keep connection strings or MongoDB-specific calls after the data has moved. Those references fail quietly in some paths and only show up when a learner triggers them. Search the configuration, plugin and custom code for MongoDB hosts, database names and driver imports, and confirm the forum service runs without a live MongoDB connection before you retire the instance.
Moderation state lost
Flags, pinned threads, closed threads and moderator actions are stored alongside posts and are easy to leave behind in a copy that only moves content. Learners then see flagged posts reappear or closed threads reopen. Before cutover, list the moderation fields your version uses, create test cases for each one on staging, and confirm each state survives the move.
No rollback path
Once the forum writes new discussion activity to MySQL, returning to MongoDB means reconciling two diverging stores. Decide the rollback trigger and the time limit before the window, and rehearse the revert on staging, including how posts written during the window are handled. Ask your implementation partner or the release notes which steps are reversible and which are one-way.
Questions buyers ask before moving Open edX forum data
What does an Open edX forum migration cost and what drives the price?
The cost comes mostly from the size and condition of the discussion data, the number of course runs and environments involved, and how much verification your team requires before cutover. Discussion data is not a single file: threads, comments, replies, and user references must be read from MongoDB, written into the MySQL-backed forum model, and checked against the learner records in MySQL. Larger archives, many courses with heavy discussion activity, and custom forum settings or plugins add review time. Ask any provider for a fixed-scope quote that lists the environments in scope, the dataset you provide, the verification steps, and the retest after cutover. Confirm whether the quote covers the upgrade work that follows, since the forum migration is a prerequisite and not the whole project.
How long does the forum migration take, and what sets the timing?
Duration depends on data volume, how many environments need the migration (for example staging before production), the number of rehearsal runs, and the maintenance window you can give learners. Plan the forum move as a step inside your forum v2 upgrade schedule, because the documented migration commands must run before the upgrade that drops MongoDB support. Scheduling constraints such as exam periods, course start dates, and change freezes often matter more than the technical work. Ask for a written timeline that names each rehearsal, the cutover window, and the rollback point, and confirm which dates depend on your own approvals.
What does our team need to provide before the migration starts?
Your team needs to provide access and information that only your organization holds. The usual inputs are:
- Working access to the current Tutor-based environment, including the MongoDB and MySQL data stores and their backups
- The Open edX and Tutor versions in use, along with any forum plugins or custom settings
- A non-production copy of recent data for rehearsal, handled under your data protection rules
- Named owners for course content, learner support, and approval of the cutover
- A decision on the maintenance window and the rollback criteria
Ask the provider to confirm each input in the written scope so that gaps are found before the schedule is set.
Can our in-house platform team run the forum migration without a partner?
Yes, if your team already operates Tutor, can restore MongoDB and MySQL from backup, and has engineers who can read the documented forum migration commands and check their output. Teams with this experience often handle the work internally. The risk is less in running the commands than in verifying the result: confirming that threads, replies, and user links survived, testing the forum in a rehearsal copy, and having a tested way back if cutover fails. Assess whether your team has the capacity to do this during the same period as the upgrade, and whether anyone has done a rehearsal before. A partner can take the planning, rehearsal, and verification work, or act as a review on your own plan.
Is a parallel run needed during the forum migration?
A parallel run is worth considering when discussions are active and learners depend on them during the move. The simplest pattern is a rehearsal on a copy of production data, followed by a short freeze on new posts during the final cutover so that nothing written after the export is lost. Running the old and new forums side by side for live traffic adds complexity around duplicate writes and user sessions, so most teams avoid it unless there is a specific business reason. Confirm in the written scope whether the rehearsal, the freeze window, and the post-cutover comparison are included, and who decides whether a parallel period is needed.
What happens to the MongoDB data after the forum move?
After verification, the MongoDB forum data is no longer the live source of discussions, but it should not be deleted immediately. Keep a verified backup for a period your records policy sets, and document where it is stored, who can access it, and how it is protected. Learner data in it may be personal data, so retention and deletion should follow your privacy rules. Once the upgrade removes MongoDB support for forums, the old store can be decommissioned on your schedule. Ask the provider for a decommissioning checklist that covers backup retention, access removal, and confirmation that no service still points to the old store.
What should a written scope for this migration include?
A useful written scope names the source and target versions, the environments in scope, the data volumes you provide, the rehearsal count, the cutover window, the verification method, the rollback plan, and the retest after go-live. It should also say who signs off each stage and which items are excluded, such as course content moves or upgrades to a later release. Ask for the list of deliverables, including the runbook, the verification report, and the handover notes. Use this list to compare providers on the same basis.
How DeployOpen scopes and delivers the forum migration
DeployOpen plans, implements, tests, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and the forum migration follows the same method. We agree a written scope first, then run the documented forum migration commands against a copy of your discussion data, verify the result, and hand over the runbook with your team.
How we scope
- Confirm your current Open edX release and whether discussion data still lives in MongoDB.
- Agree in writing which course forums, data volumes and environments the migration covers.
- Record the target MySQL setup, backup location and the release the upgrade will move to.
How we build
- Rehearse the documented forum migration commands on a restored copy of production data.
- Compare thread, comment and user counts between MongoDB and MySQL after each rehearsal run.
- Test learner-facing discussion pages, moderation tools and search before any production run.
How we hand over
- Deliver a runbook with the exact command order, configuration changes and rollback steps.
- Document the verification checks your team repeats during the production window.
- Walk your operations team through the cutover and the evidence kept for your change records.
How we support
- Engagements are fixed-scope, and ongoing support can be added as a retainer after handover.
- Retainers can cover upgrades to later named releases, which carry their own forum requirements.
- Ask any partner to confirm post-migration support hours and response terms in the written scope.

