Restore safely during an incident
Go back to a known-good snapshot on production while a Sev 1 or 2 incident is open, past the restore guardrails with break-glass, and leave a record of who did it, why and for which incident.
The situation
shop runs on the production environment as web-production. Release R-140 went out an hour ago and checkout has been failing since wave 3. Wardn noticed: wave 3 failed its checks, and INC-12 (Sev 2, "R-140 wave 3 failed its checks") is open on web-production. The last version that worked is a snapshot from six weeks ago, because a freeze and a quiet quarter meant production barely moved.
You want to go back now. The restore guardrails of the organization are doing their job: a restore does not go back further than 30 days, and a production restore needs an approver. At 02:00 nobody who can approve is awake. Break-glass is the way through: an open Sev 1 or 2 incident, linked to the restore, lets someone who holds the bypass duty restore past those guardrails, with a reason and on the record (Restore and rollback, Incidents).
What break-glass is, and is not
It lifts guardrails, nothing else. The preflight still runs: a registry that no longer has an image or a secret that is gone blocks the restore as always, and an incident does not change that (that takes a normal bypass, with its own reason). It covers this one restore, not the deployment. And it never applies to a restore with an incident that is Sev 3 or lower, resolved, mitigated, or that does not exist.
What you need
| Piece | Setting |
|---|---|
| Who restores | Someone who holds both deployment:rollback on web-production (Contributors on the app's team and the owners of the deployment, cluster, environment and app hold it) and restore:bypass, which is a duty: it is held by people designated for it (Roles and grants). restore:bypass alone does not let you restore. |
| The guardrails | At least one guardrail that governs Restore. The sample world has four, named Restore baseline: ran here before, at most 30 days old, no critical vulnerabilities, and production approver. In your own organization you write them in Guardrails, and a guardrail governs restores only if its Governs includes Restore. |
| The incident | Open, and Sev 1 or Sev 2. A release that fails in production opens a Sev 2 by itself; for one from PagerDuty the severity comes from its priority (PagerDuty). |
If no guardrail governs restores, you do not need any of this: deployment:rollback alone restores, and there is nothing to go past.
Steps
Find the incident and the snapshot
Open Incidents and filter Open. Open INC-12 and note its number, its severity, and Affected: the deployment and the snapshot it ran when the incident was raised.
Open the deployment, then Snapshots. Find the last one that worked. If you are not sure which, open it and use Compare snapshots against the running one to see what changed. The restore applies the whole snapshot, exactly as it was.
Check what the restore would run into
Check first, and link the incident while you do, so you see whether it counts. This changes nothing.
api "$WARDN_API_URL/api/v1/deployments/$DEPLOYMENT_ID/snapshots/$SNAPSHOT_ID/preflight?incidentId=INC-12" \
| jq '{blocked, breakGlass, rules: [.rules[] | {title, status, message}], findings: [.findings[] | {code, severity, message}]}'Read three things:
breakGlass.availableistruewhen INC-12 is open and Sev 1 or 2. When it isfalse,breakGlass.reasonsays why: "That incident is not open", "INC-14 is Sev 3; only an open Sev 1 or 2 incident lets a restore past the guardrails", or that it could not be read.ruleslists each guardrail requirement and whether it ismet,needs(an approval someone can still give),waiting(a fact is not known, which holds the restore) orblocked. In this story, "at most 30 days old" isblocked. "Production approver" is alreadymet, because a linked Sev 1 or 2 incident satisfies it on its own.findingswith acodeother thanguardrail.heldcome from the preflight itself:image.unresolvable,secret.missing,cluster.gone. These are not lifted by break-glass. Amigration.olderwarning means a newer snapshot ran a schema migration this one does not have: check the database can go back before you continue.
Restore past the guardrails
On the snapshot's page choose Back to an earlier snapshot. The dialog lists What changes, Before you restore and the Rules.
Under Linked incident enter INC-12 and choose Link. Under it the dialog says "INC-12 is open and Sev 1 or 2: someone who may bypass restores can go past the guardrails that hold this, as break-glass." If it says something else, the incident does not count and you will see why.
Under Reason write what you would want to read in the morning: "Checkout 5xx since R-140 wave 3; going back to the snapshot from before it, INC-12". It is required for break-glass and kept in Activity.
Choose Restore past the guardrails on web-production. The result reads "Restore queued as break-glass".
A successful answer is status: queued with breakGlass: true and bypassed: true. The restore then goes through the normal path: the same operator, waves and prune limit, with undo jobs in place of forward jobs.
What can come back instead:
| Answer | Means |
|---|---|
409 restore.break_glass_refused | The incident is not open, is Sev 3 or lower, or does not exist. The message says which. Link the right one, or use a normal bypass. |
400 restore.reason | Break-glass needs a reason. |
403 | You hold deployment:rollback but not restore:bypass, or the other way round. |
status: blocked | Something besides guardrails holds it, such as an image the registry no longer has. Fix that, or have someone with restore:bypass bypass it with its own reason. |
status: awaiting_approval | Only approvals hold it and no incident was linked, so a request is open in the approvals inbox. Link the incident to go ahead now. |
Check that it worked
- The deployment. Open it and follow the restore in the deployment's events. Its snapshot history shows the new snapshot as "Rolled back".
- Activity. Activity (
audit:read) has adeployment.restoreentry withbreakGlass: true, the incident (INC-12), the reason, the guardrails that were skipped and who did it:
api "$WARDN_API_URL/api/v1/activity?action=deployment.restore&limit=1" | jq '.items[0]'- The channel. Wardn emits a
restore.break_glassevent, always critical, that a Slack route can select, and the message is written (incident, who, reason, Open in Wardn). But the Slack worker in this version of the server does not subscribe to it yet, so nothing is posted: tell on-call yourself, and treat Activity as the record. - The incident. Nothing on the incident changes by itself. Mark it mitigated when checkout works, and resolved when the cause is fixed.
api -X POST "$WARDN_API_URL/api/v1/incidents/INC-12/mitigate"Afterwards
A restore does not turn off sync on push
The next push to main renders and applies a new snapshot, so the bad commit will come back unless you revert it. Fix git first, or set the deployment to Observe only in its settings while you do. See Restore and rollback.
Then:
- Revert or fix R-140 in git, and let the normal release carry the fix.
- Resolve the incident (Mark resolved, or
POST /incidents/INC-12/resolve). - Read the break-glass entry in Activity as a team. It is a decision made without the usual approver, and the record is there to be reviewed. If it happens often, the guardrail is too strict for how you work; change the guardrail, not the habit.
Next
Restore and rollback
The preflight, bypass, guardrails for restores and automatic rollback.
Incidents
Sources, severity, and what an incident links to.
Route notifications to the right team
Send production approvals and failed releases to the channels that need them.
Related: Guardrails, Recover from a bad change.
Delegate approvals while you are away
Cover for a team lead on leave: pass the approval duty to a colleague for two weeks, see the first approval made under it with both names, and end it early.
Route notifications to the right team
Send production approval requests to the approvers' channel, each team's release updates to its own channel, and failed production releases to on-call, then tune what each person is told in their own inbox.