Your bookmarks

Loading your bookmarks

Latest updates

New courses, skills, book chapters, and site improvements will appear here.

Create free accountSign upDashboardDashboard

Rollback

  • Standard term

A rollback is a recovery step that puts part of a system back the way it was before a change, or applies a new change that cancels it, after the new version starts causing problems.

It is fast because the earlier version already exists and already worked. Hosting services keep the versions they have published, and coding tools keep a saved history of every change to the code, so putting one back takes minutes, with no need to understand what went wrong first.

Some effects stay. Whatever the new version did beyond its own code, such as sending messages or taking payments, has already happened, and each of those needs its own repair.

Where you’ll meet it

You ask your coding agent to update the booking page on your website. Afterward nobody can book, and the update also emailed a test announcement to your whole mailing list.

What to do

Ask the agent to roll the site back to the last version that worked, and check that a test booking goes through. Once people can book again, have it find the bug in a separate copy of the site, and send the list a short note about the stray email.

Easy to mix up

Undo works on your latest edits, in the file you have open. A rollback works on a version of a system that people already use, putting it back the way it was.

Check yourself

An update to your recipe site went live Monday. On Wednesday you find a bug. Your agent can put back Sunday's code, or restore the whole site, database included, from Sunday's backup. Which keeps the recipes visitors posted Monday and Tuesday?

Go deeperA rollback works when it was planned before the release

Code is the easy part, and data is harder. If the update changed the database's structure, such as renaming a column the old code reads, the old code may fail when it looks for what is no longer there.

Teams that roll back often plan for it. They change the database in two stages, first adding what the new version needs while the old one still works, and only later removing what the old version used. Then either version can run against the same data.

Sometimes rolling back is the slower or riskier choice. Switching the new feature off with a setting, or shipping a small fix forward, can restore service without undoing other changes that went out in the same release.

Practice Build Basics

Or take the learning quiz on a mix of every set