Rollback a Deployment

Rollback lets you restore a Salesforce org to its pre-deployment state. It creates a backup automatically, so if errors or unwanted changes occur, you can quickly return the org to stability.

Overview

Rolling back a deployment reverses the metadata changes from a completed deployment. The Rollback feature:

  • Utilizes the pre-deployment backup snapshot stored by Deployment.

  • Restores components to their original state.

  • Ensures stability after a failed or problematic deployment.

Rollback is crucial in production environments where deployment errors must be rapidly corrected.

circle-info

Best Practices

  • Always validate and test before deploying to minimize the need for rollbacks.

  • Rollback all changed components if the deployment caused major issues.

  • Use rollback quickly in Production to restore stability.

  • Review rollback logs to confirm every component was successfully reverted.

  • After rollback, re-validate the branch before redeploying.

Rollback a Deployment

1

Select Deployment

circle-info

Only Deploy jobs with a status of Completed can be rolled back.

  1. Click Code from the left sidebar menu.

  2. Select a branch from the list.

  3. Click the Activities tab.

  4. Click the completed Deploy job to rollback.

2

Rollback

When performing a Rollback, you'll see a list of all components altered during deployment. You can then choose which components to revert.

circle-info

If the Rollback button isn't visible, then the Deploy job can't be rolled back.

  1. Click Rollback in the right corner of the Deploy job status page.

  2. Click Add for each branch component to revert to the pre-deployment backup.

  3. (Optional) Click Add all to add all components.

  4. Click Run to start the rollback.

  5. After starting the Rollback job, it will be displayed on the Activities tab.

Rollback Results

1

View Results

  1. Click the Activities tab.

  2. Check that the Rollback job status is Completed

circle-info

If an error occurs during the Rollback job, its status will change to Exception. Review the Rollback job log to identify the errors.

Job Status
Description

Queued

Job is created and waiting to run.

In Progress

Job is running.

Completed

Job completed successfully.

Exception

Job completed with errors.

  1. Click the Rollback job.

  2. The Rollback results page lists the job information and a detailed log

Last updated

Was this helpful?