Open edX backup and restore with Tutor

A practical guide to backing up a self-hosted Open edX platform run with Tutor, covering the databases, the project root, uploaded files, restore testing and how often to run each job.

On this page

How to back up Open edX with Tutor without losing a course

A self-hosted Open edX platform holds course content, learner records and grades that you must be able to recover. A Tutor-based backup has to capture the MySQL and MongoDB data, the Tutor project root with its configuration and secrets, and uploaded files, and it has to be proven by restore tests. Each of these three parts fails in a different way, so a backup that covers only the databases leaves gaps that surface only during an incident.

MySQL holds the relational state of the LMS: enrollments, grades, user accounts and most of the course-level records that learners and instructors rely on. MongoDB holds the course structure that Studio authors, so a restored database without its matching MongoDB dump can show learners courses that no longer resolve correctly. The Tutor project root, the directory where Tutor keeps config.yml and the generated secrets, is what lets you rebuild the same platform with the same keys. Uploaded files, such as course assets and images, live outside the databases and must be captured on their own schedule. Confirm with your Tutor version which storage backend holds these files in your deployment, because a local volume and an object store need different copy steps.

Backups are useful only after a restore has been rehearsed on a separate host. Plan a recurring restore test that rebuilds the platform from the latest dump, the saved project root and the file copy, then checks that a known course opens in Studio, that a test learner's grades appear and that login works. Record how long the rebuild took and which step needed manual work, because that number drives your recovery planning. Confirm the exact dump commands and their frequency for your environment against the Tutor documentation, since the commands and volume names depend on the Tutor release you run.

How the backup jobs fit around a Tutor installation

The diagram starts at the Tutor project root, which holds the configuration and environment that rebuild the platform. Scheduled jobs dump the MySQL and MongoDB databases and copy uploaded files from storage, then send all three outputs to a backup target outside the host. A separate restore test environment pulls from that target, so each restore is verified on a clean system. Check that the dumps and the file copy are taken from the same point in time, and that the restore environment never writes back to production.

Backup outputs leave the host and are restored into a separate test environment.

What each backup job captures and how often to run it

The MySQL database holds most of the transactional state of an Open edX platform, including user accounts, course enrollments, certificates and grade records. Enrollment and grade changes happen continuously during live courses, so this job usually drives the schedule. Plan the restore order before you build the job, because the database must come back consistent with the MongoDB content store and the project configuration.

  • Method: Take a logical dump with the MySQL client tooling from the database container or managed service, using options that produce a consistent snapshot of one point in time.
  • What a restore needs: An empty MySQL 8.0 instance, the dump file, and an account with privileges to recreate schemas and users.
  • Frequency: Work back from the acceptable loss of enrollment and grade records, agree the interval in writing with the business owner, and shorten it during grading windows.
  • Retention: Keep several generations off the host that runs the platform, so one corrupted or compromised dump does not replace the only copy.
  • Encryption: Encrypt dumps at rest, because they contain learner personal data.

Check that a dump restores into a clean instance and that enrollment and certificate counts match the source.

Backup approaches and when each fits

This table compares the three ways to protect an Open edX platform: logical database dumps, storage-layer snapshots and object storage replication for uploaded files. Read each row against your hosting setup, since the right mix usually combines a database dump with file-level protection for the Tutor project root and media. The main takeaway is that no single approach covers MySQL, MongoDB and uploads consistently, so plan a restore for each one.

ApproachConsistencyRestore and portabilityEffort to automate
Logical dumps from the host or container (MySQL, MongoDB)Consistent per database when run with the engine's own dump tooling, but separate dumps are not taken at one instant unless you pause writesRestores into a new host with the same engine version, and is the most portable option between hosts and cloudsModerate: scripted with Tutor commands or cron, plus retention and offsite copy you must add
Volume or disk snapshots of the storage layerCrash-consistent unless the database is quiesced or flushed first, so verify each restored engine starts cleanlyRestores quickly to the same provider or storage type, but snapshots are usually tied to that platformLow to moderate: provider or hypervisor schedules are simple, but cross-account copies and restore tests need work
Object storage replication for uploaded filesEventually consistent between buckets, so recent uploads may be missing in the replica at the moment of failureRestores files independently of the database, with portability depending on the bucket API your storage supportsLow once replication rules exist, but you must confirm the storage backend and bucket settings your Tutor setup uses
Tutor project root (configuration and plugins)Static between config changes, so back it up after every edit to settings, plugins or secretsRestores easily to a new host when stored in version control or copied with restricted permissionsLow: a file copy on each change, but secrets in the root need encrypted handling
Restore testing in a separate environmentConfirms that the combined backup set boots and serves courses, which no single approach proves aloneRequires a second host or cluster with matching versions, so capacity cost recursHighest effort, but the only check that backups are usable
Recovery point and recovery time trade-offsFrequent dumps shrink data loss but increase load and storage, so agree the acceptable gap with course ownersLonger restores come from large dumps and file sets, which you should measure in your own environmentSet the schedule per data type rather than one job for everything

Setting up backups for a Tutor platform

This sequence turns an running Tutor-based Open edX platform into one with scheduled, encrypted copies of its databases, uploaded files and project root, each proven by a test restore before launch. Each step ends with a check so the team knows the backup is usable, not just present.

  1. Inventory every data store

    Before writing any schedule, list every place where platform state lives on the host and in the cluster: the MySQL database, the MongoDB database, uploaded course and profile files, the Tutor project root with its configuration and plugin files, and any object storage or external service the platform writes to. Record where each one is kept and who owns it. Confirm with the Tutor documentation for your version which data sits in named volumes and which sits in host paths, because that determines what a host-level copy captures. The step is done when the team has a written list with one owner and one location per store.

  2. Confirm the Tutor project root and its contents

    Locate the Tutor project root on the platform host and check which files it holds, including the environment configuration, the generated and user-edited configuration files, and any local plugins or custom templates. Note which files are secret and must be protected once copied. Confirm the exact root path and the commands for your Tutor version against the Tutor documentation rather than relying on defaults from a previous install. The step is done when a file listing of the root is saved with the inventory and each secret-bearing file is marked.

  3. Schedule the MySQL and MongoDB dumps

    Create a scheduled job for each database dump using the Tutor-supported commands for your version, writing timestamped output to a staging directory on the platform host. Run the MySQL and MongoDB dumps at separate times so their output is clear and any failure is attributable to one store. Set the job to fail loudly and record its exit status. Confirm the dump command and any options against the Tutor documentation for your release. The step is done when a manual run produces both dump files and the job log shows a zero exit status.

  4. Check the dump contents

    Open each dump file and confirm it is not empty and contains the expected objects, for example by listing the database names and table or collection counts in the file header or by running a read-only query against a copy. Compare the sizes with the previous run to catch a sudden drop. A zero-byte file or a missing collection means the dump failed silently, so the job must be treated as broken until fixed. The step is done when the team has a recorded check result for both dumps from the same run.

  5. Copy uploads and the project root off the host

    Copy the uploaded files directory, the staged dumps and the Tutor project root to a backup target outside the platform host, such as a separate storage account, a backup server or object storage in a different failure domain. Use an incremental copy method for uploads because file counts grow over time. Confirm the target location is writable only by the backup job and is not reachable as a general share from learner networks. The step is done when the target holds the same dump files and a file count for uploads that matches the source at the time of copy.

  6. Encrypt and set retention on copies

    Encrypt every archive before it leaves the host, using a key held separately from the backup target, and store the key in your approved secrets process. Because the project root and dumps contain credentials and learner personal data, restrict who can read the target and log access. Define a retention rule that keeps enough historical copies to cover the window in which a problem might be discovered, and confirm the retention period with your compliance owner rather than assuming one. The step is done when an encrypted archive decrypts successfully on a test machine and the retention rule is written down.

  7. Run and verify a first restore

    Restore the latest encrypted copy into a separate, non-production environment built from the same Tutor version and project root, then load the MySQL and MongoDB dumps and the uploaded files. Confirm the platform starts, that a sample of course content and learner records opens, and that uploaded files resolve. Compare file counts and database object counts with the source snapshot. Record the restore steps as a runbook. The step is done when the restored environment passes these checks and the team knows which steps in the runbook were unclear or need correction.

Why restore tests matter more than the backup job

A backup is unproven until you have restored it into a separate environment and confirmed the platform works afterward. A dump file that completes without error only shows that bytes were written. It does not show that the MySQL and MongoDB data, the Tutor project root and the uploaded files still belong together. Run the restore into a clean host built with the same Tutor version and the same named Open edX release as production, because a restored database loaded into a different release can fail in ways the backup job never reveals. The restore test is the only evidence that the backup job is worth its storage cost.

After each restore, check the things learners and course teams would notice first. Confirm that a staff account can sign in to the LMS and Studio, that a representative course loads in Studio with its units and components intact, and that a test learner's enrollments and graded progress match the source. Open a few uploaded files, such as course images or static assets, to confirm the media storage was captured alongside the databases. Then check outbound email by sending a test message, because SMTP settings are often stored outside the data you restored and may point at the wrong relay or credentials. Record the Tutor version, the release, the backup timestamp, the checks run and the results, and keep that record with the backup set.

Schedule restore tests as recurring work with a named owner, not as a one-off project after an incident. Confirm with your Tutor and hosting setup how often the restore drill should run, and whether your team can build the separate environment on demand. Restoring over the production host should be a last resort, used only when the alternative is a longer outage. It removes the ability to compare before and after, and it leaves no clean copy if the restore itself fails. A rehearsed restore into a separate environment shortens recovery in a real incident because the steps, commands and gaps are already known.

Protecting backups that hold learner data and secrets

A backup of an Open edX platform holds the same sensitive material as the live system: learner records, enrollment and grade data, and the credentials that run the services. The six cards below cover the risks that connect the project root, the database dumps and the uploaded files, and the controls to decide before the first backup job runs.

Encrypt the project root

The Tutor project root holds generated configuration, including the secret values Tutor writes for services such as MySQL, MongoDB and the platform itself. Treat the whole directory as a secret store, not as source code. Encrypt it before it leaves the server, and confirm that copies in version control or shared folders do not contain it in plain text. Check that the encryption key is stored apart from the backup it protects.

Treat dumps as personal data

MySQL dumps carry account, enrollment, progress and grade records, and MongoDB holds course structure and other content that can be linked to learners. Each backup is a copy of personal data, so it falls under the same privacy rules as the live platform. Ask your privacy or legal team which fields, retention limits and deletion requests apply to backup copies, and record the answer before the first run.

Restrict who can reach backup storage

Backup buckets and backup servers are often easier to reach than the production LMS. Limit read access to the few people who restore systems, and separate it from the people who administer the live platform. Review access lists on a set schedule and log every download. Uploaded learner files stored with the backup set need the same restriction as the dumps they sit beside.

Set retention by policy

Retention should follow a written policy from your records and privacy owners, not the default settings of a backup tool. Longer retention keeps learner data longer and widens exposure if a copy leaks. Shorter retention may leave no point to restore from after a bad change is found late. Define how many daily, weekly and monthly copies you keep, and make sure deletion removes the encrypted copies as well.

Rotate backup credentials

The job that writes backups authenticates to the database, to object storage and sometimes to a remote host. Give each credential one purpose, store it in a secrets manager and rotate it on a schedule. After rotation, run a backup and a restore test to confirm the new values work. Do not reuse the database root password or the storage admin key for backup jobs.

Keep restored copies closed

A restored environment is often used for testing, troubleshooting or a rehearsal, and it can hold live learner records. Restrict it to the restore team, avoid sending its outgoing email to real learners, and disable integrations that could publish data to outside systems. Delete the environment when the test ends, and record who had access to it and when.

Questions teams ask before backing up Open edX

Can our own team back up and restore Open edX with Tutor?

Yes, if you have people who can operate Docker-based services, run database dumps and restore them into a separate environment. Tutor is the official Docker-based Open edX distribution for production, and the maintainers recommend running Open edX in production through a service provider or with Tutor, since bare-metal installation is complex and receives limited community support. The backup job itself is mostly scheduling and storage. The part teams underestimate is the restore test: proving that MySQL, MongoDB, the Tutor project root and uploaded files come back together and that the platform starts and serves courses. Ask whether your team has done a full restore into a clean host before, and who will own that test on a fixed calendar.

What makes the effort of an Open edX backup project go up or down?

Four factors drive most of the effort:

  • The number of data stores in scope: MySQL and MongoDB dumps are separate jobs with separate consistency checks.
  • Storage size and growth, which set transfer time, retention cost and the size of the restore environment.
  • The hosting model: a single Tutor host, a multi-node or Kubernetes deployment, and cloud or on-premises storage each change how dumps and volumes are captured.
  • Retention and restore testing: how many restore points you keep, how often you test them, and how much of the restore is automated.

A small single-server platform with local storage is a much smaller job than a multi-node cluster with object storage and strict retention rules.

What does the backup work need from our side?

The work needs four things from your organization:

  • Access to the hosts or Kubernetes cluster that run Tutor, including the project root and any mounted volumes.
  • Storage for backup copies that sits outside the platform's own servers, with a defined retention period.
  • A restore environment that is separate from production, sized to hold the databases and files, where a restore test can run without touching learners.
  • A named owner who approves the schedule, receives test results and decides what happens when a restore fails.

Without the named owner, restore tests tend to be skipped after the first run.

How long does a restore test take for an Open edX platform?

The duration depends mainly on the size of the MySQL and MongoDB dumps, the size of uploaded files and the speed of the storage and restore host. No duration figure is given here because it varies widely between platforms. To get a usable estimate, ask for the restore runbook timing from a test on a copy of your own data, and measure the time to restore each store, bring services up and load a course in the learner view. Ask the provider to record each step so the next test can be compared with the first.

Does a managed Tutor hosting provider take over backups?

It can, but the answer depends on the contract. Some hosting providers run backups as part of their service and others only host the infrastructure. Ask the provider in writing which stores are backed up, where copies are kept, how long they are retained, who can trigger a restore and whether restore tests are run and reported. Also confirm that you receive the Tutor project root and uploaded files, not only database dumps, so you are not dependent on one provider to rebuild the platform. The same questions apply if you bring in an outside implementation partner.

What should a quote for Open edX backup and restore include?

A quote should follow from a written scope and list each item separately:

  • The stores and files in scope: MySQL, MongoDB, the Tutor project root and uploaded files.
  • The backup schedule for each store and the retention period.
  • Where copies are stored, how they are encrypted and who can access them.
  • The restore test: frequency, environment used, steps, and what evidence is recorded.
  • The one-time setup work and any recurring work such as monitoring or retesting after upgrades.
  • Assumptions about your hosting model, storage and access, and what you must provide.

DeployOpen plans and delivers engagements against a written scope, and a quote follows from that scope. Ask for the same breakdown from any other provider so the options can be compared.

How DeployOpen scopes and delivers Open edX backup and restore

DeployOpen plans, implements, backs up, documents and supports self-hosted open-source platforms inside your own infrastructure, including Open edX deployed with Tutor. For backup and restore, the work starts with a written scope that names every data store, file store and environment, then ends with a restore test your team has watched succeed.

How we scope

  • The written scope names the MySQL and MongoDB dumps, the Tutor project root and uploaded file stores to be covered
  • Scope records which Tutor environments, hosts and cloud accounts hold each backup target
  • Retention periods, storage location and encryption approach are agreed in writing before any work starts
  • Restore objectives and the acceptance test for a successful restore are defined as deliverables
  • Engagements are fixed-scope, and ongoing backup checks and support are available as a retainer

How we build

  • Backup jobs are configured for each data store and run on the schedule agreed in the scope
  • Dumps are taken with consistent settings so MySQL and MongoDB copies can be restored together
  • Backup copies are written to storage you control, separate from the production host
  • A full restore is performed on a separate environment to confirm the platform starts and learners can sign in
  • Each restore test records the commands, timings and any gaps found in the process

How we hand over

  • Runbooks describe the backup schedule, restore sequence and who approves a production restore
  • Your team receives configuration files and scripts in a repository you own
  • The restore test report lists what was verified, what was not, and what to retest after changes
  • Handover includes a walkthrough so your operators can run a test restore without DeployOpen present
  • Documentation is written for your platform team, with the Tutor version and host layout recorded

How we support

  • Retainer support can include scheduled restore tests and checks that backup jobs are still succeeding
  • Changes to Tutor versions, plugins or storage targets trigger a review of the backup scope
  • Upgrades to a new Open edX release are planned with a fresh backup and restore test before the change
  • Support requests are handled against the written scope, with findings and fixes documented
  • Ask any partner, including DeployOpen, to confirm response expectations in the written agreement

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.