For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rolling Back 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:

  • Uses the pre-deployment backup snapshot stored by the Deploy job.

  • 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.

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.

Roll Back a Deployment

1

Select Deployment

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

  1. Click Branches from the left sidebar menu.

  2. Select a branch from the list.

  3. Click the Activities tab.

  4. Find the completed deployment job and click Deploy to open the job details.

2

Run the Rollback

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

If the Rollback button is not visible, then the Deploy job cannot be rolled back.

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

  2. Click Select for each deployed component to revert to the pre-deployment backup.

  3. (Optional) Click Select All to include 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.

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 Rollback to open the Rollback job details.

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

Last updated

Was this helpful?