Roll Back Deployment

The Metazoa Snapshot Org Management product can automatically roll back Salesforce Metadata deployments to any previous state. This is a key technology for backing up and restoring an Org after undesirable customizations are detected. Salesforce administrators can see the differences in any Org over time, and restore the Org as needed.

Roll Back Salesforce
Metadata Deployments

Snapshot provides powerful tools for restoring a Salesforce Org to any previous state. You will need to be sure that your Org has a Time Series of metadata backups. This capability is easy to set up in the Snapshot product. When you need to restore Metadata to any Salesforce Org, the Roll Back Deployment dialog has options that make this automatic.

The Roll Back Deployment dialog uses time series snapshot data to restore the destination org to an earlier date. Any one of the earlier snapshots can be selected as the source. The destination org can be refreshed and continually compared to the source until everything has been restored. The Calculate Differences button will calculate all of the differences in the source and destination org to assemble the Create and Delete Job List.

In some situations, you will get better results with the Swap Create and Delete button. In that case, the time series of earlier Job Lists are merged and flipped. Often you will only need to restore some part of a deployment. This dialog documents all of the changes and the historical Job Lists in one interface. The menu at the top of the Roll Back Deployment Metadata dialog provides three options:

  • Validating Deployment – This option will check for errors without making changes. The deployment is simulated, and no changes are actually made to your Salesforce org. All success and error messages are displayed in the results box.
  • Transactional Deployment — This option will roll back all changes if there is an error. If there are any errors, the entire deployment is rolled back; otherwise all assets will be migrated. All success and error messages are displayed in the results box.
  • Partial Deployment — This option will change everything possible and ignore errors. Assets that cause errors are rolled back, but other assets continue to deploy unless there are cascading errors. This option is not available for production orgs.

When you are deploying assets to a production org, you must use a Transactional Deployment. This option has the advantage of rolling back all changes if there is an error. Sometimes for more complex migrations, you will need to make multiple deployments.

Rolling Back a Metadata Deployment

Introduction

This documentation provides the steps and guidelines for rolling back a metadata deployment using Deployment Arrow. Sometimes, after deploying changes to metadata, it may be necessary to revert these changes to a previous state. Deployment Arrow allows users to perform a rollback, which is essentially re-deploying metadata from a time series backup.

Prerequisites

  • Deployment Arrow tool
  • Access to the metadata deployment environment
  • Knowledge of the deployment history

Steps to Rollback a Metadata Deployment

1. Selecting the Time Series Backup

Start by selecting the snapshot of the metadata that you want to revert to.
  • Open Deployment Arrow.
  • Navigate to the destination snapshot, which contains time series backups.
  • Review the deployment history to understand what changes have been made.
  • Choose a snapshot that represents the state you wish to revert to. For instance, you may want to rollback to the last snapshot or a snapshot taken a specific number of days ago.

2. Calculate Differences (Optional)

Deployment Arrow offers a “Calculate Differences” feature that can be used to automatically generate a list of changes (both creation and deletion) between two snapshots. This can be helpful in understanding what changes will be made during the rollback.
  • Click on the “Calculate Differences” button.
  • Review the generated lists of objects to be created and deleted.

3. Swap Create and Delete Job Lists (Optional)

As an alternative to using “Calculate Differences”, you can use the “Swap Create and Delete Job Lists” option. This swaps the creation and deletion lists. Essentially, whatever was created in the deployment will be deleted, and whatever was deleted will be recreated.
  • Click on the “Swap Create and Delete Job Lists” button.
  • Review the updated lists to ensure they represent the changes you want to make.

4. Deploy Metadata

After you have selected a snapshot and prepared the job lists (either using the “Calculate Differences” button or the “Swap Create and Delete Job Lists” option), you can initiate the rollback.
  • Click on the “Deploy Metadata” button.
  • Monitor the deployment process to ensure it completes successfully.

Customizing the Rollback

There is no one-size-fits-all solution for rolling back metadata, as the required changes can vary based on the situation. Deployment Arrow allows for customization of the job lists before deploying. You can manually edit the create and delete job lists if you need to make specific changes or handle unique circumstances, such as a partial deployment.

Conclusion

Rolling back a metadata deployment is a critical process that must be handled with care. Deployment Arrow offers flexible tools for managing this process, by allowing users to select a snapshot, calculate differences, swap job lists, and deploy metadata. It is important to review and confirm the changes that will be made during the rollback to ensure they align with your objectives.

Learn More!

Snapshot provides powerful tools for Salesforce Administrators that help manage the change and release process, visualize org complexity, improve security and compliance, and lower the total cost of Org ownership. Visit the AppExchange to start a 14 day free trial or click the button below to schedule a demo.

🎉 Congratulations! 🎉

You’ve successfully completed the Metazoa Metadata Studio Certification Class. With the skills you’ve acquired, you’re now adept at harnessing the power of Metazoa’s Metadata Studio, seamlessly integrating artificial intelligence into Salesforce org management. You have earned you a certificate! Well done, and we wish you continued success in your future endeavors!