How a Medplum disaster recovery plan handles a region loss
A self-hosted Medplum running in one region or data center can be lost to a regional outage, a facility failure or a cloud account incident, and the question for the team is how the platform will be running somewhere else, how quickly, and with which data. The answer is not a single backup file. Medplum's stack has several parts that must all come back together: Node.js and TypeScript application servers, PostgreSQL as the system of record, Redis as the cache, binary storage for attachments, and the configuration and secrets that tie them to your identity provider, email and DNS. A plan that restores the database but not the binaries, or the database but not the configuration, will not produce a working clinical system. The self-hosting documentation recommends AWS with CDK and CloudFormation, which makes infrastructure as code a practical starting point for rebuilding the stack in a second location, as long as the code, the parameters and the secrets it expects are stored outside the failed region.
A disaster recovery plan is the agreed sequence of steps, the named owner for each step, and the recovery targets the organization has tested against. For Medplum, that means deciding who declares the disaster, who decides which snapshot is the recovery point, who runs the CDK deployment in the target region, who rotates and reconnects secrets, who changes DNS, and who confirms that clinical users and integrations can sign in and exchange data. Confirm with your own team which recovery time and recovery point objectives leadership and clinical operations expect, because those numbers determine how often snapshots are taken, how much replication you pay for and whether a warm standby is justified. DeployOpen plans this sequence with your architects and rehearses it inside your own cloud accounts or data centers, so the first real use of the runbook is not the first time anyone has run it.
Before the plan is written, ask your platform team three questions: can the infrastructure code deploy into an empty region without manual edits, are the secrets and identity provider settings held somewhere the lost region does not control, and does anyone outside the primary region hold current access to the cloud account. Each answer shapes the runbook. A rehearsal should measure how long each stage actually takes in your environment, including database restore time, which grows with dataset size, and any post-restore checks you add before users return. Treat the first rehearsal result as the baseline for the targets you commit to, not the targets in a template.
Medplum disaster recovery options and when each fits
This table compares backup and rebuild, a pilot light in a second region, and a warm standby with a replicated database for a self-hosted Medplum. Read each row to see what stays running during a regional loss, what your team must build during an incident, and how much standing operational work each option adds. The main takeaway is that the less you keep running elsewhere, the more of the recovery effort lands on your team during the outage.
| Factor | Backup and rebuild | Pilot light in a second region | Warm standby with replicated database |
|---|---|---|---|
| What keeps running | Nothing in the second region until an incident starts | Core network, IaC definitions, and a replicated database kept ready but with compute stopped | Scaled-down Medplum stack and a replicated PostgreSQL instance running and ready to take traffic |
| Data copies | Snapshots and binary backups copied to another region on a schedule | Database replicas or snapshot copies kept current in the second region | Continuously replicated PostgreSQL and binary storage in the second region |
| What must be built during an incident | Infrastructure from code, application servers, Redis, and restored database | Application compute, load balancing, and secret reconnection before cutover | Scaling up compute, validating replication state, and cutting traffic over |
| Secrets and configuration | Rebuilt and reconnected from a secrets store copied out of the failed region | Pre-staged in the second region but tested only as part of drills | Pre-staged and kept in sync with the primary, with drift checks required |
| Standing operational load | Low, mainly backup jobs and periodic restore drills | Moderate, includes keeping replicas healthy and infrastructure definitions current | High, includes replication monitoring, cost of a second live stack, and failover runbooks |
| Typical fit | Smaller organizations or non-critical workloads that accept a longer recovery window | Organizations that need a faster rebuild than backup alone and can tolerate some cutover work | Organizations with strict uptime obligations and staff to operate a second live environment |
How the recovery phases connect after a region loss
The sequence starts when the team declares the primary region lost and ends with DNS moving traffic to the rebuilt stack. The key hand-off is the decision point, where the team confirms which recovery point it will restore from, because that choice sets the data window the business accepts. Secrets and identity provider settings sit inside a trust boundary, so they are reconnected deliberately, not copied from the failed region. Check health before any DNS change.
Recovery phases from detection to DNS cutover, with the data window decision and secrets boundary marked.
Setting Medplum RTO and RPO from your own restore tests
Your recovery time objective (RTO) and recovery point objective (RPO) for a self-hosted Medplum deployment are the numbers your team proves in a restore drill, not figures a vendor or this page can promise. RTO is the measured elapsed time from declaring a region loss to serving traffic again, and RPO is the measured age of the newest data you can restore. Set both only after a drill has timed every step on your own infrastructure.
RTO is driven by the steps your team actually performs. The largest items are usually copying the latest database snapshot and binary store to a surviving region, which depends on snapshot size and copy throughput; restoring PostgreSQL itself, which scales with database size; and rebuilding the stack from infrastructure as code, which is only fast if your templates were tested in the target account and region. Reconnecting secrets (database credentials, signing keys, email and identity provider settings) and waiting out DNS time to live before cutover add further delay. RPO is driven by how often snapshots or continuous PostgreSQL archiving run, and by whether binary storage is replicated on the same schedule as the database. A database restored from a point in time with binaries from a different moment will be inconsistent, so record both points in the drill.
Restore must land on the same Medplum version that wrote the data. Self-hosted upgrades must pass through each minor version in sequence, so a backup taken on one version cannot be safely started on an older build, and the target build must match the running version before any upgrade is attempted. Confirm the exact version in your backup manifest and in your IaC parameters, and check the Medplum upgrading guide for the sequence rules that apply to your version. Record the result of each drill as a table of step, owner, duration and version, then revisit the targets whenever your database size, Medplum version or infrastructure changes.
Cross-region restore sequence for a self-hosted Medplum
This sequence rebuilds a self-hosted Medplum in a second region after a region or data center loss, with a named check at each stage so the team knows when it can move on. The output is a verified Medplum instance serving sign-in and FHIR reads in the target region, with the original site fenced off.
Confirm recovery point and Medplum version
The incident commander and the database owner pick the most recent usable PostgreSQL recovery point and record it with the Medplum server version and the binary store snapshot it matches. Confirm the version is the one running in production, because the upgrade guide requires each minor version to be applied in sequence and a restored database must be started on a compatible server build. Done when the recovery point, version and binary store timestamp are written in the recovery log and all three agree with each other.
Copy snapshots and binary store to the target region
The platform team copies the latest PostgreSQL snapshot and the binary storage bucket or volume to the target region, and keeps the source copies in place. Check that the copied snapshot is listed and available in the target account and that object counts and checksums match the source binary store, including attachments that clinical records reference. Done when the target region shows a complete database snapshot and a binary store with matching counts and checksums.
Apply infrastructure as code in the target region
The platform team runs the same infrastructure as code used for the primary stack, such as the CDK or Terraform definitions for the chosen deployment, against the target region with the region value changed. Review the plan output so that networks, load balancers, container services, encryption keys and IAM roles are created as expected and no resource points back at the failed region. Done when the apply completes without errors and the plan reports no remaining drift against the approved configuration.
Restore the database and start the Medplum server
The database owner restores the copied snapshot into the target stack and points the Medplum server configuration at the new database endpoint. Start the Medplum server and confirm it connects to PostgreSQL without schema or migration errors, since a version mismatch typically appears here. Done when the server reports healthy, the database accepts connections, and no startup migration is pending.
Reconnect Redis, secrets and identity providers
The platform team provisions Redis in the target region, then reconnects the server to it and loads the required secrets from the target region's secret store, including database credentials, signing keys and the encryption keys for the binary store. Confirm each external identity provider and any client credentials used by integrations accept the new redirect addresses and issuer settings. Done when cache reads and writes succeed, no secret lookup fails, and an administrator can start an identity provider login.
Run health checks and sign-in smoke tests
The on-call engineer runs the server health endpoints, then a scripted smoke test that signs in with a test account, reads a known Patient resource through the FHIR API, and confirms that a read of a binary attachment succeeds. Compare returned record counts and a sample record against the recovery log to confirm the data is complete and not stale. Done when every check passes and the results are recorded, with any failure blocking the next step.
Cut over DNS and fence the old region
The network owner lowers the DNS record time to live in advance, then switches the public name to the target load balancer once the smoke tests pass. Before the old region is brought back, the team disables its server, blocks writes to its database and revokes its access to shared secrets, so two sites cannot accept clinical writes at once. Done when DNS resolves to the target region, traffic is confirmed arriving there, and the old region shows no accepted write requests.
Medplum cross-region restore by hosting environment
AWS with CDK and CloudFormation is the option Medplum's self-hosting documentation recommends, so it is the most common starting point for a cross-region plan. The CDK app is the record of what the stack looks like, which means a rebuild in a second region starts by deploying that app with the target region and account settings changed. Database and binary storage are then restored from snapshots or replicated copies into the new region, and the team reconnects application secrets and re-points DNS once the stack is healthy.
- Stack recreation: Deploy the CDK app into the recovery region, confirming that region-specific values such as certificates, VPC CIDRs and KMS keys are parameterized rather than hard coded.
- Database restore: Restore PostgreSQL from a cross-region snapshot or automated backup copy, and confirm how point-in-time recovery is handled in the recovery region.
- Binary storage: Confirm whether the binary bucket is replicated to the recovery region and whether its encryption keys exist there.
- Secrets and keys: Recreate or replicate secrets in the recovery account and confirm that the server configuration references them by name.
- Schema and version: Confirm that the server image version in the recovery stack matches the version that wrote the restored database.
Before relying on this route, confirm with Medplum which CDK version and stack outputs the target release expects, and test a rebuild in a non-production account.
On Kubernetes, the cluster itself, the Medplum manifests or Helm values, and the managed or self-run PostgreSQL and Redis services all need a recovery path. The application layer is usually the simplest part to redeploy, since the workloads are declarative. The harder questions are whether the recovery cluster exists before a disaster, how the database is restored, and how cluster-level secrets and ingress are reissued.
- Cluster recreation: Keep the cluster definition in version control so a second cluster can be built from the same source in another region.
- Database restore: Restore PostgreSQL from the snapshot or backup tool used by the database operator or managed service, and confirm the recovery point available in the other region.
- Manifest and values: Store the Medplum deployment configuration in Git so the recovery cluster deploys the same version, with region-specific values kept separate.
- Secrets and ingress: Recreate secrets through the external secrets mechanism your team uses, and reissue TLS certificates and ingress endpoints in the new region.
- Object storage: Confirm how binary storage is replicated and whether the bucket credentials differ in the recovery region.
Before relying on this route, ask Medplum to confirm the supported Kubernetes versions and the migration behavior for the release you run, and rehearse a full restore in a separate cluster.
The Docker and Ubuntu routes, including installation from the Ubuntu APT repository, place more of the rebuild on the operations team. There is no cloud-native snapshot layer provided by the deployment itself, so the recovery plan depends on the backups the host and database platform provide and on how completely the team has documented the host configuration. Recovery usually means provisioning new hosts, installing the same Medplum release, restoring PostgreSQL and then reapplying configuration.
- Host rebuild: Provision the recovery hosts from a documented image or automation, and record the operating system release and package versions in use.
- Package and image version: Install the same Medplum version that produced the backup, using the APT repository or the pinned container image.
- Database restore: Restore PostgreSQL from your own backup tooling, such as base backups with WAL archiving or your provider's snapshot service, and copy it to the recovery region.
- Configuration files: Keep the server configuration and environment files under version control, excluding secret values, so they can be reapplied on new hosts.
- Redis and file storage: Confirm whether Redis data must be restored or can be rebuilt, and where binary files are stored.
Before relying on this route, confirm with Medplum how the APT package and container images handle configuration on first start, and confirm any post-restore steps the release requires.
Medplum's documentation describes Terraform-based deployments for GCP and Azure, and marks them as Beta. A Beta route can still be a valid recovery base, but the team should treat its recovery behavior as something to prove rather than assume. The Terraform state, provider versions and cloud-native backup features all need to be confirmed for the target region before the plan is written.
- Terraform state: Store state in a backend that is itself available in the recovery region, and confirm that a second region can be applied from the same modules.
- Database backups: Confirm which managed PostgreSQL backup and replication options the Terraform module configures, and whether cross-region copies are created or must be added.
- Storage and keys: Confirm how object storage buckets and encryption keys are created and whether they can be replicated to the recovery region.
- Provider and module versions: Pin the Terraform and provider versions used in production and test them in the recovery region before a disaster.
- Support status: Ask Medplum what support applies to Beta deployment modules and whether recovery steps are documented for them.
Before relying on this route, ask Medplum to confirm in writing whether the Beta module is recommended for production recovery, and run a restore drill that matches your recovery time objective.
Reconnecting secrets, identity and DNS at cutover
The recovered Medplum stack is not usable until it can reach its database and cache in the new region, and the keys and credentials it depends on are back in place. Medplum's server runs on Node.js and uses PostgreSQL as its database and Redis as its cache, so the first job at cutover is to point the rebuilt application servers at the new PostgreSQL and Redis endpoints through the configuration your deployment method generates. Confirm in your version's self-hosting documentation exactly which settings carry these endpoints, where they are stored, and whether your infrastructure as code templates them from a single source. Treat the endpoints as recovery inputs, not as values you retype under pressure during an incident.
Signing and encryption keys, client secrets and integration credentials need the same care. The rule is that these must come from a secure, separately replicated store, such as a secrets manager or a sealed key backup held outside the failed region, and never from a copy pulled off a damaged host, where the material may be incomplete, stale or compromised. Keep an inventory that maps each secret to its consumer, including server-to-server client credentials, Bot credentials and the keys used by any Medplum Agent. Rotating a key during recovery is a separate decision with its own impact on existing tokens and sessions, so plan it deliberately rather than as a side effect of the restore.
Identity settings are the most often missed item. If you use an external identity provider such as Google, Auth0 or AWS Cognito, a corporate identity provider, or client credentials for machine access, check the redirect URLs, allowed origins and trust settings against the new endpoint before you send users to it. Medplum's authentication documentation describes how these are configured, so confirm the exact fields and any domain-level settings for your version. For DNS cutover, lower the record time to live well before any planned test, and remember that clients, proxies and integration engines may cache resolved addresses beyond that value. Confirm how each client resolves the service, and test cutover on those clients rather than assuming the new record is picked up everywhere.
Security controls that must survive a failover
A region loss is also a window in which protected health information moves, secrets get handled under pressure, and privileged access gets used quickly. The cards below name the control that has to hold in the recovery location and who owns it, so the failover does not become the weakest point in the deployment.
Encrypted backup copies in the second region
Database snapshots, binary storage copies and configuration exports from the primary region contain protected health information. The copies in the recovery region need the same encryption at rest, key ownership and access restrictions as production, and the keys must be available there before a restore starts. Check that the recovery region holds its own key material and that the backup copy job is itself audited. The customer owns this control, with the cloud account team holding the keys.
Medplum compliance docsSecrets handled during the rebuild
A rebuild from infrastructure as code tempts teams to paste database passwords, signing keys and OAuth client secrets into pipeline variables or chat. Store secrets in a managed vault, grant the recovery pipeline short-lived access, and rotate anything that was exposed during the incident. Confirm which values the Medplum server, the database connection and any Bots need, and where each is read at startup. The security engineering lead owns the process and the platform team owns the vault.
Admin and super admin access in an emergency
Break-glass accounts for Medplum administrators and super admins are the fastest path into a recovered system, which makes them a high-value target. Keep these credentials sealed, record each use, and confirm that multi-factor authentication still applies in the recovery region. Decide in advance who may invoke break-glass access and how their use is reviewed afterward. The security lead approves access and the Medplum operations owner runs it.
Medplum auth docsAudit log continuity across the cutover
Auditors will ask whether every access and change is recorded before, during and after the failover. Confirm that audit records restored from the snapshot are complete up to the recovery point, and that the recovery region writes to its own log store from the first request. Record the gap between the last replicated audit event and the failure as a documented exception. The compliance lead owns the evidence, and the platform team owns log delivery.
The old region returning and accepting writes
If the failed region comes back while DNS still points elsewhere, or a stale application server keeps a connection to its original database, two systems can accept writes to the same patient records. Before cutover, fence the old region by revoking its database credentials, disabling its load balancer targets and removing its DNS records. Restore the old region only after the team decides which copy is authoritative. The incident commander owns this decision.
Shared compliance responsibility after recovery
Medplum's compliance documentation states that compliance is a shared responsibility between Medplum and its customers. In a self-hosted deployment, the customer owns the recovery region, its backups, its access reviews and the evidence that each control worked during the failover. Write down which controls belong to your team, which belong to the cloud provider and which belong to Medplum, and test that matrix in a restore drill. The compliance lead owns the matrix, with each control owner signing off.
Medplum compliance docsLimits to confirm with Medplum and your cloud provider
This table lists the facts a recovery plan depends on and that no general guide can settle for you. Check each item against your own cloud account, region and Medplum version, and record the answer in the plan. Any row that cannot be confirmed should be treated as an open risk until it is.
| Item to confirm | Why it matters | Where to confirm it |
|---|---|---|
| Cross-region snapshot copy for your database service | Recovery after a region loss depends on a copy of the database that already sits outside the failed region. | Your cloud provider's database service documentation and your account's region list |
| Point-in-time recovery window and backup retention | The window determines how much data you can lose and how far back you can restore if corruption is found late. | Database service settings in your account, and your retention policy |
| Deployment route status for your cloud | Some Medplum deployment routes are marked Beta, so their recovery procedures may change between releases. | Medplum self-hosting docs and the release notes for your version |
| Restore behavior for your exact Medplum version | Restore and startup behavior can differ across versions, and skipping minor versions causes startup failures. | Medplum upgrading guide and your deployed version in the release history |
| Database restore duration at your data size | Restore time for a large database is set by your data volume and instance class, so it must be measured rather than assumed. | A timed restore drill in a non-production account using a copy of your production data size |
| Binary storage replication and restore path | Clinical attachments stored outside the database must also be available in the recovery region. | Your object storage settings, Medplum storage configuration and vendor documentation |
| Secrets and key material replication | A rebuilt stack cannot start without database credentials, signing keys and encryption keys in the new location. | Your secrets manager's replication features and your key management runbook |
| Coverage of disaster recovery in Medplum's compliance documentation | Shared responsibility means the recovery scope you rely on must be assigned to you, Medplum or your provider. | Medplum compliance documentation, and a written question to Medplum about its recovery scope |
Questions buyers ask about Medplum disaster recovery
What does a Medplum disaster recovery plan cost, and what drives the price?
The cost depends on how much of the recovery is designed and built for you, how many environments and regions are involved, and how often the plan is tested. DeployOpen does not publish a price list, so a quote follows from a written scope. The main cost components are the design of the recovery runbook, the infrastructure as code that rebuilds the stack in a second location, the work to restore and verify PostgreSQL and binary storage, the DNS and secrets procedures, and the restore drills. Some costs are one-time, such as the initial build, while restore drills and plan maintenance recur. Ask the vendor to separate these lines in the quote and to state which environments, regions and data volumes it assumes. Also ask who pays for cloud capacity held in the standby region, since that is billed by your cloud provider and not by the implementation partner.
How long does it take to build a Medplum disaster recovery plan?
The timeline depends on how much of the target environment already exists, how well your infrastructure is described as code, and how many systems the recovery must cover beyond Medplum. A plan that only documents a manual restore takes less time than one that rebuilds the full stack from infrastructure as code in a new region and proves it with a drill. DeployOpen does not state a fixed duration here. Ask for a schedule in the written scope that lists the discovery phase, the build of the standby procedure, the first restore drill and the handover, with the dependencies on your team's access and change approvals. Be wary of any timeline that does not mention the first full restore test, because an untested recovery path is not yet a plan.
What does our team need to provide for a Medplum recovery engagement?
The work needs named people from your side who own the cloud accounts, DNS zones, secrets stores, identity provider and the Medplum configuration. Expect to provide read access to the current infrastructure code and deployment settings, a list of the data stores and binary storage locations, and the recovery point and recovery time targets your business has agreed. You will also need a decision on which region or data center is the recovery target, and an approved window for restore drills in a non-production environment. Ask the partner to list these inputs in the scope document before work starts, so that delays from missing access do not show up later as schedule overruns.
Can our own engineers build and run a Medplum disaster recovery plan without a partner?
Yes, a capable platform team can build and run this plan, provided it has experience with the cloud provider, PostgreSQL restores, Redis, container orchestration and DNS failover, and it has time for the drills. The hard parts are rarely the Medplum settings themselves. They are the sequencing of the restore, reconnecting secrets and identity configuration in the new location, and proving that the rebuilt stack serves correct data. A partner is useful when your team lacks that experience, when it cannot dedicate people to a drill calendar, or when you want an outside review of the plan. Whichever route you choose, make sure a named internal owner keeps the runbook current after each Medplum upgrade.
How often should Medplum restores be tested?
Restores should be tested on a schedule your risk owners approve, and again after any material change to the database, storage, infrastructure code, secrets or Medplum version. A common pattern is a regular scheduled drill in a non-production environment, plus a full recovery exercise that rebuilds the stack in the recovery region and checks that the application, authentication and data work end to end. The exact frequency is a policy decision and should be written into your plan, not inherited from a vendor default. Record each drill's start and end times, the data checks performed and any gaps found, because those records are the evidence that auditors and internal reviewers ask to see.
What happens to recovery time and recovery point objectives as the data volume grows?
Larger data volumes generally lengthen restores and can widen the gap between your recovery point and the moment of failure, because the work to copy, restore and verify more data takes longer. Your recovery time objective depends on the restore duration, the rebuild time for the stack, secrets and DNS changes, and the verification steps. Your recovery point objective depends on how often backups or continuous log archiving run and how they are monitored. Medplum's upgrade guidance notes that post-deploy data migrations on large datasets can run for hours or days, which shows that data size affects operational timing. Ask the partner to measure restore time at your current volume and at your projected volume, and to state which assumptions the RTO and RPO figures depend on.
Does DeployOpen provide a compliance attestation for our Medplum disaster recovery?
No. DeployOpen does not issue audit reports, attestations or certifications. It prepares the systems, controls and evidence that your compliance team and independent auditors use in an assessment, such as the recovery runbook, restore drill records, configuration records and access reviews. Medplum's compliance documentation states that compliance is a shared responsibility between Medplum and its customers, so the recovery controls in your self-hosted deployment remain your organization's obligation to assess. Ask any partner to show in writing which evidence it will prepare, who will review it, and which assessor or certification body will make the determination, if one is required for your program.
How DeployOpen scopes and delivers Medplum disaster recovery
DeployOpen plans, builds, documents and hands over Medplum disaster recovery inside your own cloud accounts, data centers or air-gapped networks. We start from your recovery objectives and the components your deployment actually runs, then build a recovery path your team can rehearse and operate after the engagement ends.
How we scope
- Agree recovery objectives for the Medplum server, PostgreSQL, Redis, binary storage and secrets before any build starts
- Inventory the stack, including the infrastructure as code, container images and Medplum version in use
- Define the target recovery region, DNS model and who approves cutover, in writing
- Engagements are fixed-scope, with deliverables and timelines agreed before work begins
How we build
- Build a runbook for restoring database snapshots and binary storage into a second location
- Rebuild the stack from infrastructure as code and confirm it starts with the same Medplum version
- Plan how secrets, OAuth client configuration and signing keys are reconnected in the recovery environment
- Test DNS cutover and failback steps against a rehearsal environment, not only on paper
How we hand over
- Deliver the recovery runbook, architecture notes and a record of each test run and its results
- Document the RTO and RPO each test actually achieved, and the gaps that remain
- Walk your platform, security and compliance teams through the plan and the evidence they will need
- Provide a list of what your team must confirm with Medplum and your cloud provider
How we support
- Ongoing support, upgrades and recurring restore testing are available as a retainer
- Retest the recovery path after Medplum upgrades, since minor versions must be applied in sequence
- Review the plan when infrastructure, regions, secrets management or Medplum versions change
- Keep the runbook current so the team that operates Medplum can run recovery without outside help

