Skip to Content
NeoRun

Roll back a deploy

Put the previous version of an app back, by hand or automatically, and what happens to its data.

A rollback puts the previous deployment of an app back and points the domain at it again.

Automatic rollback

After a deployment goes live, NeoRun checks its health every 30 seconds for 10 minutes. Three unhealthy checks in a row start a rollback to the previous deployment.

Restoring data is never automatic. When a deploy fails after the app's data kept running, NeoRun undoes the deploy but leaves the data as the live app has it, because people may have written to it meanwhile. It then offers a data restore to a person, who usually rejects it when the data is fine. Restoring a data snapshot always needs a person, at every safety level.

Ask for one

Roll back shop on web-1.

The agent finds the live deployment with inspect_app or list_servers, then calls rollback with its deployment id. If the server's safety level allows it (the rollback is reversible and the level allows unattended changes), it starts now. Otherwise it waits for you.

What a rollback restores: the previous version's containers (they are kept, nothing is pulled or created) and the route.

Data

If the two versions share a volume, rollback needs restore_data set:

  • restore_data: true: put back the snapshot taken before the live version started. What the app wrote since is kept aside on the server. A person always approves this.
  • restore_data: false: start the old version on the live version's data. This cannot be undone, and a person has to acknowledge that.

If the versions do not share a volume, restore_data is refused.

Follow it

rollback returns a rollback_id. The agent polls get_status with it until final is true, waiting poll_after_seconds between polls, and then reports the outcome. If it failed, get_logs with the failed deployment's id shows why. A deployment that failed and was undone keeps the last lines its containers printed.

Edit this page on GitHub

On this page