We get a lot of questions on rollback and how to get an environment back to a previous state, so I did a video on it:
Tom also has an article on rollback at the following page. He covers the two main rollback scenarios that we support: Rolling back incremental component versions.
Do I really need rollback?
The thing is, most of the time, you don’t need rollback. For example, if you’ve got version 5 of something deployed to an environment and you want version 4, you don’t need to roll back to version 4; most of the time, all you have to do is deploy version 4. Some people try to use rollback in that scenario and there’s no real reason to use it there because the same standard deployment you’ve been using will do the job if you’ve got things set up right.
As the video and Tom’s article point out, there are two times when rollback fills a real need:
My deployment failed! Deploy the previous version, quick!
Suppose you run a deployment and it fails. You could manually deploy a known good version, but that takes time and manual work. The “Replace with Last Deployed” rollback type acts as a error-catching step; if a deployment fails, it automatically redeploys the versions that were there when the process started. That prevents downtime because it all happens automatically, as part of the same process that deploys your components.
I’ve got too many incremental versions in here; let’s go back to a known good state.
The other time to use rollback is when you’ve got a snapshot that you know works. Deploy will get you back to that snapshot by uninstalling component versions that aren’t in that snapshot. That’s useful for getting an environment back to a happy state. It’s a shortcut for you having to pick and choose which versions you want running in the environment and manually install and uninstall them. That’s the “Remove Undesired Incremental Versions” rollback.
I give a demo of both of these scenarios in the video, so give it a look and let us know in the forum if you’ve got other questions. (And as a bonus, I added a little segue to the video about inventory and compliance — another set of concepts that we get questions about.)