DeepGraph
All posts

"Time to restore (MTTR): the DORA metric explained"

24 November 2026 · The DeepGraph team

Time to restore is how long it takes to get production working again after a failure. It is one of the four DORA metrics. You may also see it called mean time to restore, mean time to recovery, or MTTR, and in DORA's newer reports, failed deployment recovery time.

This guide explains what time to restore measures, when the clock starts and stops, why the median often works better than the mean, and how to make recovery faster. It is written by the team behind DeepGraph, which measures it from your projects. For all four DORA metrics together, read DORA metrics explained in plain words.

Twelve weeks of deploys from a sample web shop. Each failed deploy below the line is followed by a good one, and the time between them is the time to restore. Point at a week to see its numbers.

What time to restore measures

Failures happen to every team. Time to restore shows how much each one hurts. A team that recovers in minutes can ship often without fear. A team that needs a day to recover will ship less, because every failure is expensive.

Time to restore is the safety partner of deployment frequency: deploying often is only safe if you can recover fast.

When the clock starts and stops

There are two common ways to measure it:

  • From a failed deploy. The clock starts when a production deploy fails and stops at the next good deploy to the same place, such as the same environment. Your code host records both, so it needs no extra work.
  • From an incident. The clock starts when an incident is opened and stops when it is resolved. This also catches problems that weren't caused by a deploy, but only if every incident is recorded.

Pick one and say which one you use when you share the number. Starting from failed deploys is the simplest way to begin.

Mean or median?

MTTR has "mean" in its name, but the mean, the average, is easy to distort. One failure that took two days to fix can make a month look terrible, even if every other failure was fixed in ten minutes.

The median, the middle value, shows how long a typical recovery takes: half of the failures were fixed faster, half slower. Many teams track the median and look at the longest recoveries one by one.

How to calculate time to restore

For each failed production deploy in a period, measure the time until the next successful deploy to the same place. Then take the median of those times.

For example: in a month, three deploys failed. The fixes took 20 minutes, 45 minutes, and 6 hours. The median time to restore is 45 minutes. The mean is about 2 hours and 22 minutes, pulled up by the one slow fix.

How to cut time to restore

  • Make rollback one step. If going back to the last good version takes one click or one command, most failures end in minutes.
  • Ship smaller changes. A small change is quicker to understand, so the cause of a failure is found faster.
  • Know about failures fast. Alerts that fire within minutes beat a customer email hours later.
  • Deploy in steps. If a change goes to a few users first, a failure hurts fewer people and is stopped sooner.
  • Practice. A team that has rolled back before does it calmly. Write down the steps and try them before you need them.

Time to restore in DeepGraph

DeepGraph reads deployments, workflow runs, pipelines, and CI runs from your GitHub, GitLab, Bitbucket, and SourceCraft projects. Its Time to restore is the time from a failed production deploy until the next good deploy in the same place, shown as the median.

  • From failed deploys. DeepGraph reads no incidents from tools such as PagerDuty or Jira. A failed deploy is one that GitHub, GitLab, Bitbucket, or SourceCraft marked as failed.
  • For people and teams. See time to restore for a project, a folder, a person, or a team.
  • Next to the other numbers. Read it with deploys, lead time, and the change failure rate on one screen.

See DORA in DeepGraph for more.

Questions

What is the difference between MTTR and time to restore?

They name the same idea. MTTR, mean time to restore, uses the average. Many teams, and DeepGraph, use the median instead, because one very slow recovery can distort the average.

What is a good time to restore?

Teams that ship well often recover within an hour. Compare your team with its own past, and see DORA's yearly benchmarks at dora.dev.

Does time to restore need incidents?

No. You can measure it from failed deploys and the next good deploy, which your code host already records. Incidents catch more problems, but only if your team records them.

Get started

Read about the other DORA metrics: deployment frequency, lead time for changes, and change failure rate. Or connect your first project with the Getting started guide.