Teacher Training Entitlement - Disaster Recovery
Data Recovery
This is a summary of steps from this documentation
This section describes how to restore the production or sandbox database from a backup. Follow each step in order.
⚠️ Before you begin: Ensure you have the appropriate Azure and GitHub permissions for the target environment.
Step 1 — Prevent merges to main
Block merges to main to prevent any workflows triggering during the restore process.
- Open the Rulesets → main-branch settings page.
- Under Require a pull request before merging, set Required approvals to
6.
Step 2 — Enable maintenance mode
Put the service into maintenance mode to prevent users from accessing it while the restore is in progress.
Run the GitHub Actions → Set Maintenance Mode workflow. This serves a static maintenance page to all users.
Step 3 — Locate the backup file
Daily backups are taken automatically for both Production and Sandbox environments. Backup files are stored in Azure Blob Storage at the following path:
Azure Portal → Storage accounts → <container-name> → Containers → database-backup
Container names follow this convention: <subscription><servicecodename><db><bkp><environment>sa
| Environment | Container name | Portal link |
|---|---|---|
| Production | s189p01cpdttedbbkppdsa |
Open in Azure Portal |
| Sandbox | s189p01cpdttedbbkpsbsa |
Open in Azure Portal |
Note the exact filename of the backup you intend to restore — you will need it in the next step.
Step 4 — Restore the database
Run the GitHub Actions → Restore Database workflow. When prompted, enter the backup filename identified in Step 3.
Step 5 — Re-enable merges to main
Once the restore is complete and the service is verified as healthy, reverse the branch protection change made in Step 1.
- Open the Rulesets → main-branch settings page.
- Under Require a pull request before merging, reset Required approvals to its original value.
Disable maintenance mode by re-running the GitHub Actions → Set Maintenance Mode workflow and toggling it off.