Skip to content
BENIBIX Learn

Rollback

Development☁️ DevOps & CloudDeployment

Also known as Roll Back, Revert Deployment, Rollback Deployment

Put the last version that worked back after a bad deploy.

Think of it like

Think of it like the undo button on a drawing app. One press, and the last change is gone.

Example

Jack's new release doubles the error rate. He runs one command, the old version is back in 40 seconds, and he fixes the bug after lunch.

Why it matters

Fast undo makes shipping less scary. Teams that can roll back in a minute are happy to deploy often.

Definition

A rollback puts the previous working version back after a bad deploy. Instead of fixing the bug while users suffer, you return to what worked. Then you fix the bug calmly and ship again. A good rollback takes one command and a minute or two. It only works if the old build is still saved and the data still fits it.

Example code

console
$ kubectl rollout undo deployment/web
deployment.apps/web rolled back
One command puts the web app back on its last version.

Common mistake

Never practising a rollback. The first time you try it is during an outage, and it does not work.

Key takeaways

  1. 1
    Back to what worked. Then fix calmly.
  2. 2
    One command. A minute or two.
  3. 3
    Keep old builds. Or there is nothing to go back to.

Compare