How DeployBot Makes It Easy to Rollback a Deployment

You burned the midnight oil making sure your new code was just right. Of course, you tested it and everything worked fine. But something happened along the way and your new deployment broke your site. It’s rollback time.

Fear not, DeployBot users! You can rollback to a stable version in as little as 5 to 10 seconds. Here’s how.

What Makes It Possible to Rollback a Deployment

When DeployBot deploys code to a server, it doesn’t directly delete the old files. Instead it creates a new directory for those newly deployed files. Once the deployment is finished, DeployBot creates a symlink to the new directory.

Note that this feature of DeployBot is only available for atomic deployments. Atomic deployments are also great for projects where zero down time is necessary. So if you’re in that situation, we suggest you use this type of deployment.

Once a new deployment is finished, and a link created, the older deployments still remain accessible on the server. By default, DeployBot saves the 10 last deployments on the server, but you can adjust that number as needed. Since deployments are stored on the user’s server, nothing is really kept in DeployBot.


Rollback Deployments in DeployBot

How to Rollback a Deployment in DeployBot

What happens when you deploy code that seems to break everything?

You can go into the repository, view the history and then roll back to whichever version you wish. Let’s say you just did an update that broke your whole site. Don’t panic. Just take a look at the last working update and roll back to to that one. With atomic deployments this process will take around 5 to 10 seconds to roll back.

But with older methods like standard sftp, ftp or something like shell, it’s a different story. It takes more time because DeployBot always deletes the old files when a new deployment is created.

Done correctly, rollback with atomic deployments are really easy and can take a matter of seconds. Decide which prior version you wish to use and DeployBot will roll back to that deployment.

After you’ve fixed in the code, you can continue deploying. You don’t have to do anything else. Just click deploy and DeployBot will grab all the changes made during that time and deploy the new code which was changed from the rolled back version.

So next time faulty code breaks you site, don’t sweat it. Stop counting the hours and minutes. With DeployBot, you can roll back in a matter of seconds.

Comments