Skip to content

Staging & going live

Roll back to a previous version in seconds

Undo a bad release by rolling back to an earlier successful version from the Deployments tab. No rebuild, it takes seconds, and the last 5 images are kept.

Updated 3 min read

Sometimes a release goes wrong even after testing on staging. Rolling back puts an earlier, known-good version back in place. On DployHub a rollback reuses the image we already built for that version, so there is no rebuild and it takes seconds rather than minutes.

Roll back a version

  1. 1

    Open the Deployments tab

    Open the app and go to Deployments. You see every deploy with its commit, who triggered it, how long it took and whether it succeeded.

  2. 2

    Pick an earlier successful version

    Find the last version that worked. Only successful deploys can be rolled back to.

  3. 3

    Choose the environment

    Rollback works per environment and targets live by default. You can roll back staging too.

  4. 4

    Click Roll back

    We start the stored image, wait for it to pass its health check, then switch traffic, exactly like any other release.

The rollback is zero-downtime. The version you are leaving keeps serving until the earlier version answers on its health check path. If the earlier version fails to start, the current one stays in place and the rollback is marked failed.

Which versions you can roll back to

We keep the last 5 built images for each app. You can roll back to any successful version among those. For anything older you see:

text
The image for this version is no longer on the server (we keep the last 5). Deploy again instead.

In that case, revert the change in your repository (for example with git revert) and push or click Deploy. That builds a fresh image from the old code.

bash
git revert <bad-commit-sha>
git push origin main

What a rollback does not change

  • Environment variables stay as they are now. If the bad release came with a variable change, fix the variable as well and restart.
  • Data under /data is not rolled back. If a release changed stored files or a database schema, the old version must still be able to work with them.
  • Resources (vCPU, memory, storage) stay as currently set.

Rollback versus Go live

Go live promotes whatever is running on staging to live. Rollback picks a specific earlier version from the history. Both reuse a built image and neither rebuilds your code. If a rollback does not behave as you expect, check the Logs tab for the environment, and raise a ticket with the app and deployment attached if you are stuck.

Frequently asked questions

How long does a rollback take?

Usually seconds. We reuse the stored image, so there is no build step, only a health-checked restart.

How far back can I roll back?

To any successful version among the last 5 built images for the app. Older versions need a new deploy.

Will rollback restore my data?

No. Files under /data and environment variables are not changed by a rollback.