> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reliantlabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Recover from a bad deploy by redeploying an earlier release

> Put production back on the last good release in one deploy, check that rollback floors allow it, and set a floor so nobody deploys behind a release again.

When a release goes bad in production, you put the last good release back with an ordinary deploy. Forge has no `rollback` command and nothing rolls back automatically: you name the earlier release, the plan labels the move `BEHIND`, and rollback floors refuse any release too old to run on today's data.

This guide recovers a hosted environment from a release that deployed cleanly but broke the page, then sets a floor. [Release gates](https://docs.reliantlabs.io/forge/deploy/release-gates.md#what-there-is-not-automatic-rollback) explains why going back is a deploy, not an undo.

## Before you begin

* An environment on [Reliant hosting](https://docs.reliantlabs.io/hosting/overview.md) with at least two releases in its history. [Promote a release from staging to production](https://docs.reliantlabs.io/guides/hosting/promote-release-staging-to-production.md) builds one.
* Forge v1.6.1 or later (`reliant forge --version` inside the project).

**1. Find what changed**

`obs changes` lists promotions and failed deploys, newest first:

```bash terminal theme={null}
reliant forge obs changes prod --since 2h
```

```text theme={null}
TIME            KIND       WHAT                 BY
11-20 09:10:20  promotion  promoted v2.10.0     you@example.com
11-20 09:06:43  promotion  promoted v2.9.1      you@example.com
11-20 08:58:44  promotion  promoted v2.8.1      you@example.com
```

Activity rows are trimmed. Here v2.10.0 is live, and v2.9.1 was the last release that served the page.

**2. Check the floors admit the earlier release**

```bash terminal theme={null}
reliant forge env floor check prod v2.9.1
```

```text theme={null}
prod's rollback floors admit v2.9.1.
  floor     admitted (no rollback floor)
```

`floor check` only reads. Exit 1 means a floor refuses that release; see Troubleshooting.

**3. Redeploy the earlier release**

Name the version, and say why with `--note`, which is recorded on the ledger:

```bash terminal theme={null}
reliant forge env deploy prod v2.9.1 --note "v2.10.0 renders a blank page" --yes
```

```text theme={null}
Rollout of v2.9.1 to prod: SUCCEEDED
  promotion d9bbacc7-82da-49d2-ad3c-a46d280fd44a
  waited 1m49.965s
Promoted env "prod": v2.10.0 → v2.9.1
  direction BEHIND  BEHIND — v2.9.1 is 1 release(s) OLDER than v2.10.0 (by commit ancestry). This moves the environment BACKWARDS; it undoes nothing v2.10.0 did
  WARNING   prod moves BACKWARDS. The schema and data v2.10.0 left behind stay; v2.9.1's code will run against them.
            Recovery is roll forward: prefer cutting a release with the fix and promoting that.
```

Nothing is rebuilt: the deploy uses the digests v2.9.1 recorded when it was cut. To review first, use `--plan-only`, then `--approve` the digest it prints.

**4. Verify the recovery**

The page served v2.9.1 again (`curl` returned `<title>guides-sandbox-promote v2.9.1</title>`), and the timeline marks the move:

```bash terminal theme={null}
reliant forge env releases list prod
```

```text theme={null}
AT                    RELEASE        WHAT                       WHO                       COMMITS  ROLLOUT       GATES  HEALTH
2026-11-20 09:13:25Z  v2.9.1 (live)  ROLLBACK (behind v2.10.0)  you@example.com via cli   1        succeeded     -      inconclusive
2026-11-20 09:10:20Z  v2.10.0        promote (from v2.9.1)      you@example.com via cli   1        succeeded 5s  -      inconclusive
```

`reliant forge env status prod` compares what the platform serves with the release and reports `1 match, 0 drifted, 0 missing`.

**5. Set a floor so nobody deploys behind this release**

When the release you are on changed something older code cannot run on, such as a migration, set an order floor at it:

```bash terminal theme={null}
reliant forge env floor set prod --current --reason "v2.9.1 adds a migration older releases cannot run on"
```

```text theme={null}
Set a rollback floor on prod:
  flr_a5326ca94c8f4c1ab6136cb64b8b9c5d  order: nothing cut before v2.9.1 — roll_forward_only, "v2.9.1 adds a migration older releases cannot run on"
```

A later attempt to deploy v2.8.1 was refused with exit 1 before anything was written:

```text theme={null}
promote refused (below_rollback_floor): prod's rollback floor refuses v2.8.1: v2.8.1 was cut before the floor's release v2.9.1 (roll_forward_only floor: "v2.9.1 adds a migration older releases cannot run on")
```

A migration marked `-- forge:breaks-rollback` raises a declared floor by itself when its release is promoted, so you need this step only for changes forge cannot see.

**6. Roll forward with the fix**

The earlier release is a stopgap. Fix the bug, cut a new release, and promote it the usual way, through staging if you have one.

## What this does not do

* **No automatic rollback.** A rollout that never becomes healthy leaves the previous release serving, and a failed migration stops the deploy before any workload changes. A release that rolls out and then misbehaves, like v2.10.0 here, whose rollout `SUCCEEDED`, stays live until you deploy something else.
* **No undo.** Going back does not reverse the newer release's migrations or the data it wrote, which is why floors exist.
* **No break-glass for hosted environments.** `--offline-ledger` redeploys from a cached ledger only where forge applies the release from your machine; it is refused for hosted environments. See [Releases and promotion](https://docs.reliantlabs.io/forge/deploy/releases-and-promotion.md#there-is-no-rollback-command).

## Troubleshooting

> [accordion] promote refused (below\_rollback\_floor)
>
> A floor refuses the release you named, and no deploy flag skips it. Roll forward instead, or, if the floor no longer applies, lower or lift it with a reason: `reliant forge env floor show prod` lists the floors, and [Rollback floors](https://docs.reliantlabs.io/forge/deploy/release-gates.md#rollback-floors) covers `lower`, `clear` and `lift`.

> [accordion] promotion\_conflict (exit 3)
>
> Someone else deployed to the environment after your plan was computed. Re-run with `--plan-only`, read what landed, and decide again.

> [accordion] rollout\_in\_flight (exit 4)
>
> The bad release is still rolling out. Wait for it, or pass `--supersede`, which is recorded on the new promotion, to replace it now.

## Next steps

> [card] [Promote to production](https://docs.reliantlabs.io/guides/hosting/promote-release-staging-to-production.md)
>
> Move a release staging runs to prod by digest.

> [card] [Gate prod on release health](https://docs.reliantlabs.io/guides/hosting/gate-production-deploy-release-health.md)
>
> Stop a bad release in staging before prod takes it.

> [card] [Release gates](https://docs.reliantlabs.io/forge/deploy/release-gates.md)
>
> `obs check`, health gates and every floor verb.

> [card] [How release promotion works](https://docs.reliantlabs.io/forge/deploy/releases-and-promotion.md)
>
> Releases, the ledger, and why there is no rollback command.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.