Erawanไทย

Keep it running

Going back one version — in seconds

The release you just made is worse than the one before it. This is the shortest way back, what it does not touch, and why it is fast.

The command

erawan rollback my-app

The app returns to the release before this one and the URL never changes.

Why it takes seconds

It does not rebuild. The image from the previous release is still in the registry, and rolling back points the app at it — which is why exactly two images are kept per app rather than one. Keeping one would make a rollback a rebuild, in the middle of the incident that made you want one.

What it does not touch

Your data. A rollback moves the code your app runs; the database, the disk and everything in them stay exactly as they are. That is usually what you want and occasionally not — if the bad release also wrote bad rows, going back to the old code leaves those rows in place. That is a different repair, and it is rewinding.

What to check first

erawan status my-app

That shows the version running now and the history behind it, so you can see there is a previous release to return to. An app whose first deploy is the one that broke has nothing behind it, and rollback says so rather than pretending.

Then fix forward

A rollback buys time; it is not the repair. Deploy again under the same name once the code is right and the app moves forward — same URL, next version, and the release you rolled back from is still in the history if you need to read it.

All lessons