With Gearset, you can easily roll back any deployment made through the application in a few clicks, with support for both full and partial rollback. (This is available for
Enterprise metadata licenses).
How rollback works in Gearset
Gearset's rollback works thanks to our automatic org snapshots. Whenever you run a deployment in Gearset, the snapshot of your target orgs metadata for the selected items in your metadata filter are automatically saved just prior to deployment.
That means if you ever need to roll back changes, Gearset will run a comparison between the stored snapshot metadata before deployment and the org's current live state. This will highlight what changes have been made since the snapshot, and let you selectively roll back any of those specific metadata changes.
Rollbacks take advantage of Gearset's unique problem analyzers to identify and include any required dependencies for the rollback to succeed.
There's no limit to how far back you can go to perform a rollback, with the caveat that if you try to roll back a deployment from some time ago, you may see a large number of detected changes between the snapshot and the org's live state.
Rollbacks can also be performed for source control in exactly the same way.
How to roll back a deployment with Gearset
Click on the deployment you want to roll back from your Deployment history, and then click
Gearset will run a comparison between a snapshot of the environment as it was before this deployment and its current state. From here, you can choose exactly which changes to roll back.
Items will be pre-selected for the rollback, but you can customize the selection. In this example, permissions were accidentally deleted as part of the original deployment, and I now want to re-add them, so I ensure that just this box is selected.
2. After selecting the objects to roll back, click
NEXT to be taken to the problem analysis screen, where Gearset will check for any issues with this rollback deployment.
3. Then click
Pre-Deployment Summary to see a summary of items to be deployed.
Deploy Now to complete the rollback process, or
Validate Deployment and deploy afterward.
After successfully rolling back your changes, your deployment will be stored in your deployment history, tagged as a rollback. From there, you can view the usual PDF deployment report, download the package, and even roll back the rollback, if you wish!
Note: that if you are rolling back a deleted item, the Salesforce Data for that item and any linked metadata objects that are not requirements for that object to deploy successfully will not automatically be deployed unless they were included in the original deployment.