Deployments
Rollbacks
How to put an earlier release live again, and what a rollback does not undo.
On this page
A rollback puts the image of an earlier release live again.
brewless rollback production
A rollback runs on the PHP version that release was built for, whatever brewless.yml says now.
With API Guardian, a rollback gives bunny.net the OpenAPI document of the release it returns to, in log mode again.
Without a number this goes back to the release before the live one. To pick a specific release:
brewless rollback production --release=182
The client asks for confirmation first; --force skips the question.
What a rollback does
The image of the earlier release runs again as a new release. Nothing is rebuilt, so a rollback is quick, and your release history stays a straight line: the rollback is the newest entry in it.
You can only go back to a release that served visitors at some point. A release that failed or was cancelled never has an image that is known to work. See Release statuses.
What a rollback does not do
Warning
The database is left as it is: nothing is migrated back. If releases after the one you go back to changed the database, its code has to work with that newer schema.
The console tells you before you confirm when later releases changed the database.
Variables and brewless.yml
The rollback takes along the revision of your variables that the earlier release ran with, and what your brewless.yml asked of it: the sizes and scale of the containers, the scheduler, the queues and the release commands. How long the edge keeps a page (edge.cache) is one of those variables, so it goes back too. The firewall and the bot policy at bunny.net stay as they are: a rollback does not set Shield, and the next deploy sets what its file asks. Like a deploy, a rollback empties the edge, and warming it from your sitemap (edge.warm) follows afterwards on its own. Its release commands run again before it goes live. Variables you changed since stay in your Secret Manager as newer revisions; the next deploy takes the newest one again. When that secret was deleted at Scaleway, the rollback stops instead of taking the variables of a newer one; see When the secret was deleted at Scaleway.
Services
A rollback does not touch the containers of your services: they keep the image of their last brewless service:push. What it does take back is which services the application is told about. Going back to a release from before a service was in brewless.yml leaves out that service's <NAME>_URL and <NAME>_TOKEN, so the application no longer finds it; the service itself keeps running. The next deploy gives them back.
Realtime
A rollback does take back the realtime server on image: app: the realtime container runs the image of the earlier release, with that release's variables and settings. When the earlier release had no realtime server yet, the container is left as it is. On the Brewless image it stays on the version Brewless pins. The keys never change, so the pages of the earlier release connect as before.
The live image again, with new variables
A switch to the standby copy of the database (brewless db:failover) ends with a release of its own: the image of the live release, put live again with the variables as they are now, so the containers reach the new database without a build. The console shows such a release as the image of the release it repeats. See A standby copy.
A release with a security update
A release Brewless starts itself to put a security update under the live one works the same way: the image of the live release, with only its base image replaced, runs again as a new release. You can roll back from it to the release before, which brings the images it ran on back too.